import { lazy, Suspense } from 'react'; import { Routes, Route, Navigate } from 'react-router-dom'; import { useAuth } from '@/hooks/useAuth'; import LockScreen from '@/components/auth/LockScreen'; import AppLayout from '@/components/layout/AppLayout'; // AS-2: Lazy-load all route components to reduce initial bundle parse time const DashboardPage = lazy(() => import('@/components/dashboard/DashboardPage')); const TodosPage = lazy(() => import('@/components/todos/TodosPage')); const CalendarPage = lazy(() => import('@/components/calendar/CalendarPage')); const RemindersPage = lazy(() => import('@/components/reminders/RemindersPage')); const ProjectsPage = lazy(() => import('@/components/projects/ProjectsPage')); const ProjectDetail = lazy(() => import('@/components/projects/ProjectDetail')); const PeoplePage = lazy(() => import('@/components/people/PeoplePage')); const LocationsPage = lazy(() => import('@/components/locations/LocationsPage')); const SettingsPage = lazy(() => import('@/components/settings/SettingsPage')); const NotificationsPage = lazy(() => import('@/components/notifications/NotificationsPage')); const AdminPortal = lazy(() => import('@/components/admin/AdminPortal')); const RouteFallback = () => (