From a9425f38ca01aa511923d1752b265655c17a582a Mon Sep 17 00:00:00 2001 From: eshanized Date: Wed, 25 Dec 2024 11:14:22 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(route):=20browser=20to=20has?= =?UTF-8?q?h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes.tsx | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/routes.tsx b/src/routes.tsx index d7768d14..e0fb1bca 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,7 +1,8 @@ -import { Routes, Route } from 'react-router-dom'; +import { HashRouter, Routes, Route } from 'react-router-dom'; import { Suspense, lazy } from 'react'; import { Loader2 } from 'lucide-react'; +// Lazy load your pages const HomePage = lazy(() => import('./pages/Home')); const AboutPage = lazy(() => import('./pages/About')); const FeaturesPage = lazy(() => import('./pages/Features')); @@ -10,6 +11,7 @@ const DevelopersPage = lazy(() => import('./pages/Developers')); const DonatePage = lazy(() => import('./pages/Donate')); const GalleryPage = lazy(() => import('./pages/Gallery')); +// Loading spinner component function LoadingSpinner() { return (
@@ -18,18 +20,21 @@ function LoadingSpinner() { ); } +// AppRoutes component with HashRouter export function AppRoutes() { return ( - }> - - } /> - } /> - } /> - } /> - } /> - } /> - } /> - - + + }> + + } /> + } /> + } /> + } /> + } /> + } /> + } /> + + + ); -} \ No newline at end of file +}