Commit a1ec877b authored by Karen Konou's avatar Karen Konou

[User] Fetch info for correct id

parent af9bf72a
......@@ -21,8 +21,7 @@ import Gargantext.Config.REST (logRESTError)
import Gargantext.Config.Utils (handleRESTError)
import Gargantext.Ends (Frontends)
import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes as Routes
import Gargantext.Sessions (WithSession, WithSessionContext, sessionId)
import Gargantext.Sessions (Session(..), WithSession, WithSessionContext, sessionId)
import Gargantext.Types (FrontendError)
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
......@@ -101,11 +100,13 @@ userLayoutWithKeyCpt = here.component "userLayoutWithKey" cpt where
reload <- T.useBox T2.newReload
reload' <- T.useLive T.unequal reload
let Session {userId} = session
cacheState <- T.useBox LT.CacheOn
useLoader { errorHandler
, loader: getUserInfoWithReload
, path: { nodeId, reload: reload', session }
, path: { nodeId: userId, reload: reload', session }
, render: \userInfo@{ ui_username } ->
H.ul { className: "col-md-12 list-group" } [
display { title: fromMaybe "no name" (Just ui_username) }
......
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