Skip to content

Scheduling infrastructure for absolutely everyone.

Bring back PublicShell (#6505)

Alex van Andel207e120d66f9
diff --git a/packages/features/shell/Shell.tsx b/packages/features/shell/Shell.tsx
index c2df8660d76..78aa12993c9 100644
--- a/packages/features/shell/Shell.tsx
+++ b/packages/features/shell/Shell.tsx
@@ -184,18 +184,29 @@ const KBarWrapper = ({ children, withKBar = false }: { withKBar: boolean; childr
<>{children}</>
);
-export default function Shell(props: LayoutProps) {
+const PublicShell = (props: LayoutProps) => {
const { status } = useSession();
+ return (
+ <KBarWrapper withKBar={status === "authenticated"}>
+ <CustomBrandingContainer />
+ <Layout {...props} />
+ </KBarWrapper>
+ );
+};
+
+export default function Shell(props: LayoutProps) {
// if a page is unauthed and isPublic is true, the redirect does not happen.
useRedirectToLoginIfUnauthenticated(props.isPublic);
useRedirectToOnboardingIfNeeded();
useTheme("light");
- return (
- <KBarWrapper withKBar={status === "authenticated"}>
+ return !props.isPublic ? (
+ <KBarWrapper withKBar>
<CustomBrandingContainer />
<Layout {...props} />
</KBarWrapper>
+ ) : (
+ <PublicShell {...props} />
);
}