From b6655a0ee06584d3ab10f38d766856bdd41905d7 Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Sat, 17 Feb 2024 17:36:09 +0100 Subject: [PATCH] Clear all stored session data when user disconnects himself. --- src/App/Container.purs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/App/Container.purs b/src/App/Container.purs index 90cab19..4d54e0e 100644 --- a/src/App/Container.purs +++ b/src/App/Container.purs @@ -463,11 +463,10 @@ handleAction = case _ of Disconnection -> do H.put $ initialState unit + + -- Remove all stored session data. sessionstorage <- H.liftEffect $ Window.sessionStorage =<< HTML.window - _ <- H.liftEffect $ Storage.removeItem "user-authd-token" sessionstorage - _ <- H.liftEffect $ Storage.removeItem "current-page" sessionstorage - _ <- H.liftEffect $ Storage.removeItem "current-zone" sessionstorage - handleAction $ Routing Home + H.liftEffect $ Storage.clear sessionstorage -- TODO: depending on the current page, we should provide the received message to different components. DNSManagerDaemonEvent ev -> case ev of