reverse order of notifications so it's ASC
This commit is contained in:
parent
ee7aa12fd0
commit
a8f5f917dd
@ -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
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user