Commit ecfb8074 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[router] fix session setting, docs table sidebar works now

parent 718c44e8
......@@ -151,7 +151,7 @@ docViewCpt = here.component "docView" cpt where
, sidePanelState
, tabType
, totalRecords
} ] ] ]
} [] ] ] ]
type SearchBarProps =
( query :: T.Box Query )
......@@ -247,8 +247,8 @@ filterDocs query docs = A.filter filterFunc docs
filterFunc (Response { hyperdata: Hyperdata { title } }) =
isJust $ Str.indexOf (Str.Pattern $ Str.toLower query) $ Str.toLower title
pageLayout :: Record PageLayoutProps -> R.Element
pageLayout props = R.createElement pageLayoutCpt props []
pageLayout :: R2.Component PageLayoutProps
pageLayout = R.createElement pageLayoutCpt
pageLayoutCpt :: R.Component PageLayoutProps
pageLayoutCpt = here.component "pageLayout" cpt where
......
......@@ -125,6 +125,9 @@ authedCpt = here.component "authed" cpt where
sessions' <- T.useLive T.unequal sessions
let session' = Sessions.lookup sessionId sessions'
R.useEffect' $ do
T.write_ session' session
case session' of
Nothing -> pure $ home homeProps []
Just s -> pure $ R.fragment [ content s, footer {} [] ]
......@@ -192,6 +195,9 @@ sidePanelCpt = here.component "sidePanel" cpt where
sidePanelState' <- T.useLive T.unequal sidePanelState
session' <- T.useLive T.unequal session
R.useEffect' $ do
here.log2 "sidePanel session" session'
case session' of
Nothing -> pure $ H.div {} []
Just s ->
......
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