From 8167dac7a43f4c8d0114c0c70bbafc2cf6605d09 Mon Sep 17 00:00:00 2001 From: eshanized Date: Wed, 25 Dec 2024 11:00:53 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(change):=20browser=20router?= =?UTF-8?q?=20to=20hash=20router?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 8 ++++---- src/routes.tsx | 42 ++++++++++++++++++++++-------------------- 2 files changed, 26 insertions(+), 24 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 9768104a..54a35385 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,9 +1,9 @@ import { BrowserRouter as Router } from 'react-router-dom'; import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; -import { ErrorBoundary } from '@/components/ui/ErrorBoundary'; -import { Navbar } from '@/components/layout/Navbar'; -import { Footer } from '@/components/layout/Footer'; -import { AppRoutes } from '@/routes'; +import { ErrorBoundary } from './components/ui/ErrorBoundary'; +import { Navbar } from './components/layout/Navbar'; +import { Footer } from './components/layout/Footer'; +import { AppRoutes } from './routes'; const queryClient = new QueryClient({ defaultOptions: { diff --git a/src/routes.tsx b/src/routes.tsx index 57fc4ad1..ce779b9c 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,14 +1,14 @@ -import { Routes, Route } from 'react-router-dom'; +import { HashRouter as Router, Routes, Route } from 'react-router-dom'; import { Suspense, lazy } from 'react'; import { Loader2 } from 'lucide-react'; -const HomePage = lazy(() => import('@/pages/Home')); -const AboutPage = lazy(() => import('@/pages/About')); -const FeaturesPage = lazy(() => import('@/pages/Features')); -const DownloadPage = lazy(() => import('@/pages/Download')); -const DevelopersPage = lazy(() => import('@/pages/Developers')); -const DonatePage = lazy(() => import('@/pages/Donate')); -const GalleryPage = lazy(() => import('@/pages/Gallery')); +const HomePage = lazy(() => import('./pages/Home')); +const AboutPage = lazy(() => import('./pages/About')); +const FeaturesPage = lazy(() => import('./pages/Features')); +const DownloadPage = lazy(() => import('./pages/Download')); +const DevelopersPage = lazy(() => import('./pages/Developers')); +const DonatePage = lazy(() => import('./pages/Donate')); +const GalleryPage = lazy(() => import('./pages/Gallery')); function LoadingSpinner() { return ( @@ -20,16 +20,18 @@ function LoadingSpinner() { export function AppRoutes() { return ( - }> - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - + + }> + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + ); -} \ No newline at end of file +}