reverse order of notifications so it's ASC

This commit is contained in:
Borislav Pantaleev 2025-02-27 20:16:30 +02:00
parent ee7aa12fd0
commit a8f5f917dd

View File

@ -22,9 +22,11 @@ const useServerNotifications = () => {
const fetchNotifications = async () => { const fetchNotifications = async () => {
const notificationsResponse: ServerNotificationsResponse = await dataProvider.getServerNotifications(etkeccAdmin, command !== ""); const notificationsResponse: ServerNotificationsResponse = await dataProvider.getServerNotifications(etkeccAdmin, command !== "");
const serverNotifications = [...notificationsResponse.notifications];
serverNotifications.reverse();
setServerNotifications({ setServerNotifications({
...notificationsResponse, ...notificationsResponse,
notifications: notificationsResponse.notifications, notifications: serverNotifications,
success: notificationsResponse.success success: notificationsResponse.success
}); });
}; };