refactor(onboarding): restructure onboarding routes and components
- Removed obsolete onboarding routes: complete, create-complex, index, verify-email, and verify. - Introduced new setup stepper page for onboarding process. - Created a multi-step setup component to handle complex creation with validation. - Added new schemas for complex creation and plan features. - Implemented detailed steps for complex name, location, plan selection, and court setup. - Enhanced error handling and user feedback during the onboarding process.
This commit is contained in:
14
apps/frontend/src/routes/onboard/setup.tsx
Normal file
14
apps/frontend/src/routes/onboard/setup.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { SetupStepperPage } from '@/features/onboard/setup-stepper-page';
|
||||
import { createFileRoute, redirect } from '@tanstack/react-router';
|
||||
|
||||
export const Route = createFileRoute('/onboard/setup')({
|
||||
beforeLoad: ({ context }) => {
|
||||
const hasSession = context.auth.isAuthenticated;
|
||||
const hasPendingSignup = Boolean(sessionStorage.getItem('pending-signup-email'));
|
||||
|
||||
if (!hasSession && !hasPendingSignup) {
|
||||
throw redirect({ to: '/login' });
|
||||
}
|
||||
},
|
||||
component: SetupStepperPage,
|
||||
});
|
||||
Reference in New Issue
Block a user