mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
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:
parent
ea57f5bb3b
commit
909f45bc3f
4 changed files with 54 additions and 34 deletions
|
@ -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()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue