Automatically close the menu when changing page.

master
Philippe PITTOLI 2024-04-11 09:45:47 +02:00
parent 9039c43ab9
commit 28f5e3091b
1 changed files with 4 additions and 1 deletions

View File

@ -75,7 +75,10 @@ handleAction :: forall m. MonadAff m => Action -> H.HalogenM State Action () Out
handleAction = case _ of
ToggleMenu -> H.modify_ \state -> state { active = not state.active }
-- | 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
H.raise $ Disconnection
H.modify_ _ { logged = false }