diff --git a/client/src/app/routes/index.tsx b/client/src/app/routes/index.tsx index 1f34896..5368c17 100644 --- a/client/src/app/routes/index.tsx +++ b/client/src/app/routes/index.tsx @@ -1,29 +1,31 @@ import { lazy, Suspense } from 'react' import { Route, Routes } from 'react-router-dom' import { MainLayout } from '@/app/layout/MainLayout' -import { AboutPage } from '@/pages/about' -import { AuthCallbackPage, AuthPage } from '@/pages/auth' -import { CartPage } from '@/pages/cart' -import { CheckoutPage } from '@/pages/checkout' -import { HomePage } from '@/pages/home' -import { InfoPage } from '@/pages/info' -import { NotFoundPage } from '@/pages/not-found' -import { PrivacyPolicyPage } from '@/pages/privacy-policy' -import { ProductPage } from '@/pages/product' -import { TermsPage } from '@/pages/terms' import { usePageTitleReset } from '@/shared/lib/use-page-title' import { SkeletonPage } from '@/shared/ui/SkeletonPage' const AdminLayoutPage = lazy(() => import('@/pages/admin-layout').then((m) => ({ default: m.AdminLayoutPage }))) const MeLayoutPage = lazy(() => import('@/pages/me').then((m) => ({ default: m.MeLayoutPage }))) +const HomePage = lazy(() => import('@/pages/home').then((m) => ({ default: m.HomePage }))) +const AuthPage = lazy(() => import('@/pages/auth').then((m) => ({ default: m.AuthPage }))) +const AuthCallbackPage = lazy(() => import('@/pages/auth').then((m) => ({ default: m.AuthCallbackPage }))) +const CartPage = lazy(() => import('@/pages/cart').then((m) => ({ default: m.CartPage }))) +const CheckoutPage = lazy(() => import('@/pages/checkout').then((m) => ({ default: m.CheckoutPage }))) +const AboutPage = lazy(() => import('@/pages/about').then((m) => ({ default: m.AboutPage }))) +const InfoPage = lazy(() => import('@/pages/info').then((m) => ({ default: m.InfoPage }))) +const PrivacyPolicyPage = lazy(() => import('@/pages/privacy-policy').then((m) => ({ default: m.PrivacyPolicyPage }))) +const TermsPage = lazy(() => import('@/pages/terms').then((m) => ({ default: m.TermsPage }))) +const ProductPage = lazy(() => import('@/pages/product').then((m) => ({ default: m.ProductPage }))) +const NotFoundPage = lazy(() => import('@/pages/not-found').then((m) => ({ default: m.NotFoundPage }))) + export function AppRoutes() { usePageTitleReset() return ( - } /> + }>} /> } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> - } /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> + }>} /> } /> - } /> - } /> + }>} /> + }>} /> )