supermemory/apps/web/app/(app)/layout.tsx
MaheshtheDev fe5d16509a feat: ensure workspace created on nova new account (#798)
Added workspace management to the onboarding flow with automatic organization creation and workspace validation throughout the app.

### What changed?

- Wrapped the app layout with an `EnsureWorkspace` component that redirects users without organizations to onboarding
- Enhanced the welcome page to automatically create an organization with a generated slug when users complete their name input
- Expanded the auth context to track organizations list, restoration state, and provide organization refetching capabilities
- Added utility functions for generating unique organization slugs and usernames from display names
- Implemented proper organization restoration logic that handles saved preferences and multiple organization scenarios
2026-03-24 18:17:21 +00:00

13 lines
313 B
TypeScript

"use client"
import { EnsureWorkspace } from "@/components/ensure-workspace"
import { MobileBanner } from "@/components/mobile-banner"
export default function AppLayout({ children }: { children: React.ReactNode }) {
return (
<>
<MobileBanner />
<EnsureWorkspace>{children}</EnsureWorkspace>
</>
)
}