Start integrating the onboarding flow with backend 1

This commit is contained in:
Urtzi Alfaro
2025-09-03 18:29:56 +02:00
parent a55d48e635
commit a11fdfba24
31 changed files with 1202 additions and 1142 deletions

View File

@@ -6,7 +6,6 @@ import React from 'react';
import { Navigate, useLocation } from 'react-router-dom';
import { useAuthUser, useIsAuthenticated, useAuthLoading } from '../stores';
import { RouteConfig, canAccessRoute, ROUTES } from './routes.config';
import { isMockAuthentication } from '../config/mock.config';
interface ProtectedRouteProps {
children: React.ReactNode;
@@ -129,12 +128,8 @@ export const ProtectedRoute: React.FC<ProtectedRouteProps> = ({
const isLoading = useAuthLoading();
const location = useLocation();
// MOCK MODE - Allow access to onboarding routes for testing
const isOnboardingRoute = location.pathname.startsWith('/app/onboarding');
if (isMockAuthentication() && isOnboardingRoute) {
return <>{children}</>;
}
// Note: Onboarding routes are now properly protected and require authentication
// Mock mode only applies to the onboarding flow content, not to route protection
// Show loading spinner while checking authentication
if (isLoading) {