Files
accounted/app/(onboarding)/layout.tsx
T
Mattsson bf5a8d9195 Fix/multiple company (#203)
* Refactor onboarding and dashboard logic; add silent team creation for users

- Removed unnecessary useCompany context in DashboardContent and SettingsSidebar components.
- Simplified onboarding setup logic to allow direct access to the dashboard for users without companies.
- Introduced WelcomeOnboarding component to handle user onboarding steps.
- Added migration to create silent teams for all users at signup, backfilling existing users without teams, and cleaning up incomplete companies.

* fix: update greeting logic and improve email handling in TIC extension

* Redirect to onboarding for users without companies and update onboarding flow

* Build issue fix

* Enhance onboarding experience by adding existing companies check
2026-04-09 11:54:12 +02:00

21 lines
572 B
TypeScript

import { createClient } from '@/lib/supabase/server'
import { SentryIdentify } from '@/components/SentryIdentify'
export default async function OnboardingLayout({
children,
}: {
children: React.ReactNode
}) {
const supabase = await createClient()
const { data: { user } } = await supabase.auth.getUser()
return (
<div className="min-h-screen bg-background flex items-center justify-center">
<div className="w-full max-w-lg px-5">
{children}
</div>
{user && <SentryIdentify userId={user.id} email={user.email} />}
</div>
)
}