import { useTranslation } from 'react-i18next';
import close from '../assets/cross.svg';
interface NotificationProps {
notificationText: string;
notificationLink: string;
handleCloseNotification: () => void;
}
const stars = Array.from({ length: 12 }, (_, i) => ({
id: i,
size: Math.random() * 2 + 1, // 1-3px
left: Math.random() * 100, // 0-100%
top: Math.random() * 100, // 0-100%
animationDuration: Math.random() * 3 + 2, // 2-5s
animationDelay: Math.random() * 2, // 0-2s
opacity: Math.random() * 0.5 + 0.3, // 0.3-0.8
}));
export default function Notification({
notificationText,
notificationLink,
handleCloseNotification,
}: NotificationProps) {
const { t } = useTranslation();
return (
<>
{/* Animated stars background */}
{stars.map((star) => (
))}
{notificationText}
>
);
}