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