Automatically close the menu when changing page.

This commit is contained in:
Philippe PITTOLI 2024-04-11 09:45:47 +02:00
parent 9039c43ab9
commit 28f5e3091b

View File

@ -75,7 +75,10 @@ handleAction :: forall m. MonadAff m => Action -> H.HalogenM State Action () Out
handleAction = case _ of handleAction = case _ of
ToggleMenu -> H.modify_ \state -> state { active = not state.active } ToggleMenu -> H.modify_ \state -> state { active = not state.active }
-- | Page change. -- | Page change.
Navigate page -> H.raise $ Routing page Navigate page -> do
-- Automatically close the menu.
H.modify_ \state -> state { active = false }
H.raise $ Routing page
UnLog -> do UnLog -> do
H.raise $ Disconnection H.raise $ Disconnection
H.modify_ _ { logged = false } H.modify_ _ { logged = false }