Start integrating the onboarding flow with backend 1
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user