Commit b8529d4d authored by Karen Konou's avatar Karen Konou

fix logout function

parent 9e3e5773
...@@ -230,7 +230,7 @@ tutorial :: R2.Leaf TutorialProps ...@@ -230,7 +230,7 @@ tutorial :: R2.Leaf TutorialProps
tutorial = R2.leaf tutorialCpt tutorial = R2.leaf tutorialCpt
tutorialCpt :: R.Component TutorialProps tutorialCpt :: R.Component TutorialProps
tutorialCpt = here.component "tutorial" cpt where tutorialCpt = here.component "tutorial" cpt where
cpt { sessions } _ = do cpt { boxes, sessions } _ = do
pure $ pure $
...@@ -253,11 +253,11 @@ tutorialCpt = here.component "tutorial" cpt where ...@@ -253,11 +253,11 @@ tutorialCpt = here.component "tutorial" cpt where
[ video x.id, H.h4 {} [ H.text x.title ], H.p {} [ H.text x.text ] ] [ video x.id, H.h4 {} [ H.text x.title ], H.p {} [ H.text x.text ] ]
-} -}
-- onSignOutClick _ = void $ Sessions.change (Logout session) sessions onSignOutClick session = void $ Sessions.change (Logout session) boxes.sessions
onSignOutClick _ = do -- onSignOutClick _ = do
log "Logging sessions:" -- log "Logging sessions:"
-- log show session -- log show session
for_ sessions $ \element -> log (show element) -- for_ sessions $ \element -> log (show element)
makeFolders :: Array Session -> Array R.Element makeFolders :: Array Session -> Array R.Element
...@@ -298,7 +298,7 @@ tutorialCpt = here.component "tutorial" cpt where ...@@ -298,7 +298,7 @@ tutorialCpt = here.component "tutorial" cpt where
, defaultSlot: , defaultSlot:
B.iconButton B.iconButton
{ name: "sign-out" { name: "sign-out"
, callback: onSignOutClick , callback: \_ -> onSignOutClick session
, elevation: Level2 , elevation: Level2
, className: "text-light" , className: "text-light"
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment