Skip to content

Commit

Permalink
added a default path to handle refresh events
Browse files Browse the repository at this point in the history
  • Loading branch information
arositen committed May 29, 2024
1 parent 596895d commit 143c488
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Route, Routes } from 'react-router-dom';
import { Route, Routes, Navigate } from 'react-router-dom';
import { useState, useEffect } from "react";
import Navbar from '@/scenes/navbar';
import Splash from '@/scenes/splash';
Expand Down Expand Up @@ -41,6 +41,8 @@ function App() {
<Route path={`${basePath}/:section/details`} element={<Details />} />
<Route path={`${basePath}/:section/details/:id`} element={<Details />} />
<Route path={`${basePath}/checkout`} element={<Checkout />} />
{/* default redirect to home page */}
<Route path="*" element={<Navigate to={`${basePath}/`} />} />
</Routes>
<Footer />
</ShoppingCartProvider>
Expand Down

0 comments on commit 143c488

Please sign in to comment.