Первая постановка на уведомления

This commit is contained in:
mi
2026-07-26 13:20:23 +03:00
parent 8c3c454998
commit 8822ae609f
15 changed files with 698 additions and 271 deletions
+19 -28
View File
@@ -2,16 +2,12 @@ import { useState } from 'react';
import { useNavigate, useLocation } from 'react-router';
import { ArrowRight, Check, ExternalLink, ShieldCheck } from 'lucide-react';
interface ConsentLink {
label: string;
href: string;
}
interface ConsentItem {
id: string;
required: boolean;
text: string;
links: ConsentLink[];
linkLabel: string;
linkHref: string;
}
const consents: ConsentItem[] = [
@@ -19,22 +15,22 @@ const consents: ConsentItem[] = [
id: 'pdp',
required: true,
text: 'Я ознакомлен с Политикой обработки персональных данных ООО «ХАН» и даю своё Согласие на обработку моих персональных данных',
links: [
{ label: 'Согласие на обработку ПД', href: '#pdp-consent' },
{ label: 'Политика обработки ПД', href: '#pdp-policy' },
],
linkLabel: 'Политика обработки персональных данных',
linkHref: '#pdp',
},
{
id: 'terms',
required: true,
text: 'Я прочитал и соглашаюсь с Пользовательским соглашением',
links: [{ label: 'Пользовательское соглашение', href: '#terms' }],
linkLabel: 'Пользовательское соглашение',
linkHref: '#terms',
},
{
id: 'marketing',
required: false,
text: 'Я даю своё согласие на получение рекламных и маркетинговых коммуникаций',
links: [{ label: 'Условия получения коммуникаций', href: '#marketing' }],
linkLabel: 'Условия получения коммуникаций',
linkHref: '#marketing',
},
];
@@ -117,22 +113,17 @@ export function AuthConsent() {
<span className="text-destructive ml-1">*</span>
)}
</p>
{/* Ссылки на документы */}
<div className="flex flex-wrap gap-x-3 gap-y-1">
{consent.links.map(link => (
<a
key={link.href}
href={link.href}
onClick={e => e.stopPropagation()}
className="inline-flex items-center gap-1 text-xs text-primary underline underline-offset-2 hover:opacity-75 transition-opacity"
target="_blank"
rel="noreferrer"
>
<ExternalLink className="w-3 h-3" />
{link.label}
</a>
))}
</div>
{/* Ссылка на документ */}
<a
href={consent.linkHref}
onClick={e => e.stopPropagation()}
className="inline-flex items-center gap-1 text-xs text-primary underline underline-offset-2 hover:opacity-75 transition-opacity"
target="_blank"
rel="noreferrer"
>
<ExternalLink className="w-3 h-3" />
{consent.linkLabel}
</a>
</div>
</div>
</div>