diff --git a/src/App/Page/Navigation.purs b/src/App/Page/Navigation.purs index 9fec7d3..ad0a07d 100644 --- a/src/App/Page/Navigation.purs +++ b/src/App/Page/Navigation.purs @@ -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 }