27: onboarding flow - make onComplete optional for server component layout
This commit is contained in:
@@ -24,7 +24,7 @@ export default function DashboardLayout({ children }: { children: React.ReactNod
|
||||
</div>
|
||||
</div>
|
||||
<MobileBottomNav />
|
||||
<OnboardingFlow onComplete={() => {}} />
|
||||
<OnboardingFlow />
|
||||
<div className="sr-only" aria-live="polite" aria-atomic="true" id="a11y-announcer" />
|
||||
</KeyboardShortcutsProvider>
|
||||
);
|
||||
|
||||
@@ -18,7 +18,7 @@ import { Rocket, ListTodo, Flame } from 'lucide-react';
|
||||
const ONBOARDED_KEY = 'pe_onboarded';
|
||||
|
||||
interface OnboardingFlowProps {
|
||||
onComplete: () => void;
|
||||
onComplete?: () => void;
|
||||
}
|
||||
|
||||
export function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
|
||||
@@ -37,7 +37,7 @@ export function OnboardingFlow({ onComplete }: OnboardingFlowProps) {
|
||||
function handleDismiss() {
|
||||
localStorage.setItem(ONBOARDED_KEY, 'true');
|
||||
setOpen(false);
|
||||
onComplete();
|
||||
onComplete?.();
|
||||
}
|
||||
|
||||
async function handleCreateDomain() {
|
||||
|
||||
Reference in New Issue
Block a user