Skip to content

Commit

Permalink
Make onboarding dialog non-blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
N2D4 committed Dec 30, 2024
1 parent dc91c25 commit f11bd9e
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
import { AdminAppProvider } from "./use-admin-app";
import { Suspense } from "react";
import { OnboardingDialog } from "./onboarding-dialog";
import SidebarLayout from "./sidebar-layout";
import { AdminAppProvider } from "./use-admin-app";

export default function Layout(props: { children: React.ReactNode, params: { projectId: string } }) {
return (
<AdminAppProvider projectId={props.params.projectId}>
<OnboardingDialog />
{/* Don't block the rest of the page for the dialog, so wrap it with a Suspense */}
<Suspense fallback={<></>}>
<OnboardingDialog />
</Suspense>
<SidebarLayout projectId={props.params.projectId}>
{props.children}
</SidebarLayout>
Expand Down

0 comments on commit f11bd9e

Please sign in to comment.