Skip to content

Commit

Permalink
Replace BrowserRouter with HashRouter for gh-pages (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
domhhv authored Feb 8, 2024
1 parent 072ffb1 commit a051885
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CssVarsProvider, styled } from '@mui/joy';
import { SessionContextProvider } from '@supabase/auth-helpers-react';
import { supabaseClient, theme } from '@utils';
import React from 'react';
import { BrowserRouter, Route, Routes } from 'react-router-dom';
import { HashRouter, Navigate, Route, Routes } from 'react-router-dom';

const StyledAppContainerDiv = styled('div')({
display: 'flex',
Expand All @@ -36,7 +36,7 @@ const App = () => {
<AuthProvider>
<HabitsProvider>
<CalendarEventsProvider>
<BrowserRouter>
<HashRouter>
<AppHeader />
<StyledAppContainerDiv>
<Routes>
Expand All @@ -45,9 +45,13 @@ const App = () => {
element={<Calendar aria-label="Event date" />}
/>
<Route path="/account" element={<AccountPage />} />
<Route
path="*"
element={<Navigate to="/calendar" replace />}
/>
</Routes>
</StyledAppContainerDiv>
</BrowserRouter>
</HashRouter>
</CalendarEventsProvider>
</HabitsProvider>
</AuthProvider>
Expand Down

0 comments on commit a051885

Please sign in to comment.