51 lines
1.6 KiB
TypeScript
51 lines
1.6 KiB
TypeScript
import { IconX } from '@tabler/icons-react'
|
|
import React from 'react'
|
|
|
|
interface CookieNoticeButton {
|
|
label: string;
|
|
action: () => void;
|
|
}
|
|
|
|
interface CookieNotice {
|
|
buttons: CookieNoticeButton[];
|
|
message: string;
|
|
order: number
|
|
}
|
|
|
|
const CookieNotice = () => {
|
|
const cookieNoticeData: CookieNotice = {
|
|
order: 0,
|
|
message: "Продолжая использовать сайт, Вы принимаете условия <a href='https://new.jkhsakha.ru/wp-content/uploads/2025/09/politika-obrabotki-personalnyh-dannyh-gup-zhkh-rsja.pdf'>ПОЛИТИКИ</a> и даёте согласие на обработку пользовательских данных (файлов cookie).",
|
|
buttons: [
|
|
{
|
|
label: "Понятно",
|
|
action: () => {
|
|
// Логика принятия cookies
|
|
console.log("Cookies accepted");
|
|
}
|
|
},
|
|
{
|
|
label: "Отклонить",
|
|
action: () => {
|
|
// Логика отклонения cookies
|
|
console.log("Cookies rejected");
|
|
}
|
|
}
|
|
]
|
|
};
|
|
|
|
return (
|
|
<div>
|
|
{/* <div dangerouslySetInnerHTML={{ __html: cookieNoticeData.message }} />
|
|
{cookieNoticeData.buttons.map((button, index) => (
|
|
<button key={index} onClick={button.action}>
|
|
{button.label}
|
|
</button>
|
|
))} */}
|
|
{/* <IconX /> */}
|
|
</div>
|
|
|
|
)
|
|
}
|
|
|
|
export default CookieNotice |