notifications
This commit is contained in:
parent
1aa5b08093
commit
d2d2832276
@ -59,7 +59,10 @@ export function Email() {
|
||||
read: email.flags.seen,
|
||||
starred: email.flags.flagged,
|
||||
folder: email.folder
|
||||
})).slice(0, 5); // Only show the first 5 emails
|
||||
}))
|
||||
// Sort emails by date (most recent first)
|
||||
.sort((a: Email, b: Email) => new Date(b.date).getTime() - new Date(a.date).getTime())
|
||||
.slice(0, 5); // Only show the first 5 emails
|
||||
|
||||
setEmails(transformedEmails);
|
||||
setMailUrl('/courrier');
|
||||
@ -78,7 +81,9 @@ export function Email() {
|
||||
const date = new Date(dateString);
|
||||
return new Intl.DateTimeFormat('fr-FR', {
|
||||
month: 'short',
|
||||
day: 'numeric'
|
||||
day: 'numeric',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit'
|
||||
}).format(date);
|
||||
} catch (e) {
|
||||
return '';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user