notifications

This commit is contained in:
alma 2025-05-04 12:22:53 +02:00
parent 3275b8b6c9
commit c00459e1f8

View File

@ -1,6 +1,6 @@
import React, { memo, useState, useEffect } from 'react';
import Link from 'next/link';
import { Bell, Check, ExternalLink, AlertCircle, LogIn } from 'lucide-react';
import { Bell, Check, ExternalLink, AlertCircle, LogIn, Kanban } from 'lucide-react';
import { Badge } from '@/components/ui/badge';
import { useNotifications } from '@/hooks/use-notifications';
import { Button } from '@/components/ui/button';
@ -175,9 +175,20 @@ export const NotificationBadge = memo(function NotificationBadge({ className }:
{!notification.isRead && (
<Badge variant="secondary" className="ml-2 bg-blue-500 text-white">New</Badge>
)}
{notification.source === 'leantime' && (
<Badge variant="outline" className="ml-2 text-[10px] py-0 px-1.5 bg-amber-50 text-amber-700 border-amber-200 flex items-center">
<Kanban className="mr-1 h-2.5 w-2.5" />
Agilité
</Badge>
)}
</p>
<p className="text-xs text-muted-foreground">
{formatDistanceToNow(new Date(notification.timestamp), { addSuffix: true })}
{notification.source && (
<span className="ml-1 opacity-75">
{notification.source === 'leantime' ? 'Leantime' : notification.source}
</span>
)}
</p>
</div>
<div className="flex space-x-1 ml-2">