import { Clock, ArrowLeft, Bell, AlertCircle, Calendar, MessageCircle, Tag, Smartphone } from 'lucide-react'; import { useNavigate } from 'react-router'; import { getActiveMessages, CompanyMessage } from '../data/companyMessages'; function getIcon(type: CompanyMessage['type']) { if (type === 'urgent') return ; if (type === 'reminder') return ; if (type === 'message') return ; if (type === 'promo') return ; if (type === 'install') return ; return ; } function typeColors(type: CompanyMessage['type']) { if (type === 'urgent') return { icon: 'bg-destructive/12 text-destructive', dot: 'bg-destructive' }; if (type === 'reminder') return { icon: 'bg-primary/10 text-primary', dot: 'bg-primary' }; if (type === 'message') return { icon: 'bg-[#c8e6c9] text-[#2e7d32]', dot: 'bg-[#43a047]' }; if (type === 'promo') return { icon: 'bg-[#fff3cd] text-[#e65100]', dot: 'bg-[#fb8c00]' }; if (type === 'install') return { icon: 'bg-[#d1c4e9] text-[#4527a0]', dot: 'bg-[#7c4dff]' }; return { icon: 'bg-muted text-muted-foreground', dot: 'bg-muted-foreground' }; } export function History() { const navigate = useNavigate(); const messages = getActiveMessages(); return (
{/* Заголовок страницы */}

Центр уведомлений

{messages.length > 0 && ( {messages.length} )}
{/* Список уведомлений */} {messages.length > 0 ? (
{messages.map(msg => { const colors = typeColors(msg.type); return ( ); })}
) : (

Всё актуально

Новых уведомлений нет

)}
); }