Skip to content

Commit

Permalink
fix(onboarding-flow): v3
Browse files Browse the repository at this point in the history
  • Loading branch information
aliraza556 committed Oct 27, 2024
1 parent b5285b6 commit 2517933
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export const App = () => {
}, [runningProjectId, setRunningProjectMessages])

useEffect(() => {
if (isAdmin && !appMetaData?.title && !visible) {
if (!isAdmin && appMetaData?.title && !visible) {
open()
}
}, [isAdmin, appMetaData?.title, open, visible])
Expand All @@ -350,27 +350,28 @@ export const App = () => {
<Leva hidden={!isDevelopment || true} isRoot />

<Suspense fallback={<div>Loading...</div>}>
{!splashDataLoading &&
(visible ? (
<Suspense fallback={<div>Loading Onboarding...</div>}>
<LazyOnboardingModal onSuccess={setUniverseQuestionIsOpen} />
</Suspense>
) : (
<Wrapper direction="row">
<FormProvider {...form}>
<LazyMainToolbar />
{!universeQuestionIsOpen && <LazySideBar />}
<LazyUniverse />
<Overlay />
<AppBar />
<Version>v{version}</Version>
<ActionsToolbar />
</FormProvider>

<ModalsContainer />
<Toasts />
</Wrapper>
))}
{visible && (
<Suspense fallback={<div>Loading Onboarding...</div>}>
<LazyOnboardingModal onSuccess={setUniverseQuestionIsOpen} />
</Suspense>
)}

{!visible && !splashDataLoading && (
<Wrapper direction="row">
<FormProvider {...form}>
<LazyMainToolbar />
{!universeQuestionIsOpen && <LazySideBar />}
<LazyUniverse />
<Overlay />
<AppBar />
<Version>v{version}</Version>
<ActionsToolbar />
</FormProvider>

<ModalsContainer />
<Toasts />
</Wrapper>
)}
</Suspense>
</>
)
Expand Down

0 comments on commit 2517933

Please sign in to comment.