mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2025-09-06 04:35:18 +02:00
🐛 fix(change): browser router to hash router
This commit is contained in:
@@ -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: {
|
||||
|
@@ -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,6 +20,7 @@ function LoadingSpinner() {
|
||||
|
||||
export function AppRoutes() {
|
||||
return (
|
||||
<Router>
|
||||
<Suspense fallback={<LoadingSpinner />}>
|
||||
<Routes>
|
||||
<Route path="/" element={<HomePage />} />
|
||||
@@ -31,5 +32,6 @@ export function AppRoutes() {
|
||||
<Route path="/gallery" element={<GalleryPage />} />
|
||||
</Routes>
|
||||
</Suspense>
|
||||
</Router>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user