updated widgets
This commit is contained in:
51
src/components/CookieNotice/CookieNotice.tsx
Normal file
51
src/components/CookieNotice/CookieNotice.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
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
|
||||
Reference in New Issue
Block a user