From abadd4f29fd1fb7787fd0cf558855811e668251f Mon Sep 17 00:00:00 2001 From: Lucas Leite Date: Sun, 13 Feb 2022 18:48:30 -0300 Subject: Changed notification approach --- modern/src/SocketController.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modern/src/SocketController.js') diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js index 69932fce..e178abb6 100644 --- a/modern/src/SocketController.js +++ b/modern/src/SocketController.js @@ -79,7 +79,6 @@ const SocketController = () => { id: event.id, message: `${devices[event.deviceId]?.name}: ${t(prefixString('event', event.type))}`, show: true, - close: () => setEvents(events.filter((e) => e.id !== event.id)), }))); }, [events, devices]); @@ -95,7 +94,7 @@ const SocketController = () => { open={notification.show} message={notification.message} autoHideDuration={5000} - onClose={notification.close} + onClose={() => setEvents(events.filter((e) => e.id !== notification.id))} /> ))} -- cgit v1.2.3