"use client" import { Box, Center, Flex, Grid, rem, Text, Transition } from '@mantine/core'; import { useShallowEffect } from '@mantine/hooks'; import React, { useState } from 'react'; import { IoCloseOutline, IoNotifications } from 'react-icons/io5'; import { TEMA } from '../bin/val_global'; import { useHookstate } from '@hookstate/core'; export default function NotificationCustome({ onClose, title, desc, onClick }: { onClose: () => void, title: string, desc: string, onClick: () => void, }) { const [opened, setOpened] = useState(false); const tema = useHookstate(TEMA) useShallowEffect(() => { const timer = setTimeout(() => { setOpened(true); }, 2000); return () => clearTimeout(timer); }, []); useShallowEffect(() => { const timer = setTimeout(() => { setOpened(false) }, 6000); return () => clearTimeout(timer); }, []); function reloadData() { onClose() } return ( <>
{(state) => (
{title} {desc}
)}
); }