enhancement(notifications): remove from state after dismissal

This commit changes the implementation from an array to a Map,
as that makes accessing a notification for dismissal or removal
more performant.

Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
Erik Michelson 2023-10-14 03:37:30 +02:00
parent ea57f5bb3b
commit 909f45bc3f
4 changed files with 54 additions and 34 deletions

View file

@ -14,6 +14,7 @@ export const mockUiNotifications = () => {
jest.spyOn(useUiNotificationsModule, 'useUiNotifications').mockReturnValue({
showErrorNotification: jest.fn(),
dismissNotification: jest.fn(),
dispatchUiNotification: jest.fn()
dispatchUiNotification: jest.fn(),
pruneNotification: jest.fn()
})
}