From 3c4c35e5c1c0563e94ecb246917d8aaaf84307a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Thu, 11 Dec 2025 15:01:08 +0100 Subject: [PATCH] fix: order events by date --- assets/components/search/EventTimeline.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/assets/components/search/EventTimeline.tsx b/assets/components/search/EventTimeline.tsx index 6d325f9..c6d7c1a 100644 --- a/assets/components/search/EventTimeline.tsx +++ b/assets/components/search/EventTimeline.tsx @@ -32,7 +32,8 @@ function getWhoisRemoveTimelineEvent(whoisRemoveDateEstimate: Date, withRenewalP } return { - color: withRenewalPeriod ? 'grey' : 'yellow', + date: whoisRemoveDateEstimate, + color: withRenewalPeriod ? 'yellow' : 'grey', dot: , pending: true, ...text @@ -51,7 +52,7 @@ export function EventTimeline({events, expiresInDays, isRenewalPeriod}: { const locale = navigator.language.split('-')[0] const rdapEventNameTranslated = rdapEventNameTranslation() const rdapEventDetailTranslated = rdapEventDetailTranslation() - const items: TimeLineItemProps[] = [] + const items: (TimeLineItemProps & { date: Date })[] = [] if (expiresInDays !== undefined) { const whoisRemoveDateEstimate = new Date(new Date().getTime() + expiresInDays * 24 * 60 * 60 * 1e3) @@ -96,6 +97,7 @@ export function EventTimeline({events, expiresInDays, isRenewalPeriod}: { } return { + date: new Date(e.date), color: e.deleted ? 'grey' : actionToColor(e.action), dot: actionToIcon(e.action), pending: new Date(e.date).getTime() > new Date().getTime(), @@ -107,6 +109,6 @@ export function EventTimeline({events, expiresInDays, isRenewalPeriod}: { return b.date.getTime() - a.date.getTime())} /> }