From a8f5f917ddac7614e94beeeffdd228fff5fef692 Mon Sep 17 00:00:00 2001 From: Borislav Pantaleev Date: Thu, 27 Feb 2025 20:16:30 +0200 Subject: [PATCH] reverse order of notifications so it's ASC --- src/components/etke.cc/ServerNotificationsBadge.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/etke.cc/ServerNotificationsBadge.tsx b/src/components/etke.cc/ServerNotificationsBadge.tsx index a1e2d1d..7b5ff67 100644 --- a/src/components/etke.cc/ServerNotificationsBadge.tsx +++ b/src/components/etke.cc/ServerNotificationsBadge.tsx @@ -22,9 +22,11 @@ const useServerNotifications = () => { const fetchNotifications = async () => { const notificationsResponse: ServerNotificationsResponse = await dataProvider.getServerNotifications(etkeccAdmin, command !== ""); + const serverNotifications = [...notificationsResponse.notifications]; + serverNotifications.reverse(); setServerNotifications({ ...notificationsResponse, - notifications: notificationsResponse.notifications, + notifications: serverNotifications, success: notificationsResponse.success }); };