Skip to content

Commit

Permalink
fix: pageloader changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Riddhiagrawal001 committed Oct 14, 2024
1 parent ef32216 commit 21d0fd2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/entryPoints/HyperSwitchApp.res
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ let make = () => {
let hyperSwitchAppSidebars = SidebarValues.useGetSidebarValues(~isReconEnabled)
sessionExpired := false

let (renderKey, setRenderkey) = React.useState(_ => "")

let setUpDashboard = async () => {
try {
// NOTE: Treat groupACL map similar to screenstate
Expand All @@ -50,9 +48,8 @@ let make = () => {
| _ => ()
}
setDashboardPageState(_ => #HOME)
setRenderkey(_ => profileId)
} catch {
| _ => setScreenState(_ => PageLoaderWrapper.Error(""))
| _ => setScreenState(_ => PageLoaderWrapper.Error("Failed to setup dashboard!"))
}
}
let path = url.path->List.toArray->Array.joinWith("/")
Expand Down Expand Up @@ -83,11 +80,13 @@ let make = () => {
// INTEGRATION_DOC Need to be removed
| #INTEGRATION_DOC => <UserOnboarding />
| #HOME =>
<div className="relative" key={renderKey}>
<div className="relative">
// TODO: Change the key to only profileId once the userInfo starts sending profileId
<div className={`h-screen flex flex-col`}>
<div className="flex relative overflow-auto h-screen ">
<Sidebar path={url.path} sidebars={hyperSwitchAppSidebars} />
<Sidebar
path={url.path} sidebars={hyperSwitchAppSidebars} key={(screenState :> string)}
/>
<PageLoaderWrapper
screenState={screenState} sectionHeight="!h-screen" showLogoutButton=true>
<div
Expand Down
1 change: 1 addition & 0 deletions src/screens/Helpers/PageLoaderWrapper.res
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@unboxed
type viewType = Loading | Error(string) | Success | Custom

module ScreenLoader = {
Expand Down

0 comments on commit 21d0fd2

Please sign in to comment.