notifications
This commit is contained in:
parent
1aa5b08093
commit
d2d2832276
@ -59,7 +59,10 @@ export function Email() {
|
|||||||
read: email.flags.seen,
|
read: email.flags.seen,
|
||||||
starred: email.flags.flagged,
|
starred: email.flags.flagged,
|
||||||
folder: email.folder
|
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);
|
setEmails(transformedEmails);
|
||||||
setMailUrl('/courrier');
|
setMailUrl('/courrier');
|
||||||
@ -78,7 +81,9 @@ export function Email() {
|
|||||||
const date = new Date(dateString);
|
const date = new Date(dateString);
|
||||||
return new Intl.DateTimeFormat('fr-FR', {
|
return new Intl.DateTimeFormat('fr-FR', {
|
||||||
month: 'short',
|
month: 'short',
|
||||||
day: 'numeric'
|
day: 'numeric',
|
||||||
|
hour: '2-digit',
|
||||||
|
minute: '2-digit'
|
||||||
}).format(date);
|
}).format(date);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return '';
|
return '';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user