Merge branch 'dev' into fixcss/event

merge dev into fixcss
This commit is contained in:
ORDONNEAU Antoine
2026-03-26 12:18:38 +01:00
32 changed files with 330 additions and 255 deletions
@@ -0,0 +1,38 @@
import formatDate from "../../utils/date/formatDate.js";
import formatTime from "../../utils/date/formatTime.js";
import styles from "./NotificationCard.module.css"
import Notification from "../../interfaces/notification.interface";
interface NotificationCardProps {
notifications: Notification[];
deleteNotification: (id: number) => void;
}
function NotificationCard({ notifications, deleteNotification }: NotificationCardProps) {
return (
notifications.map((notification, index) => (
<div className={`${styles.notificationCard} glassBorder`}key={index}>
<div className={styles.cardHeader}>
<span className={styles.timeTag}>
Le {formatDate(notification.created_at)} à {formatTime(notification.created_at)}
</span>
<button
className={styles.closeIconButton}
onClick={() => deleteNotification(notification.id)}
title="Supprimer"
>
</button>
</div>
<div className={styles.cardContent}>
<p className={styles.message}>
{notification.content}
</p>
</div>
</div>
))
);
}
export default NotificationCard;