Skip to content

Commit

Permalink
feat: catch all undefined paths and redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
Dezert01 committed Dec 31, 2024
1 parent 8b6db5d commit 3f9798b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/antalmanac/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { TourProvider } from '@reactour/tour';
import { SnackbarProvider } from 'notistack';
import { useEffect } from 'react';
import ReactGA4 from 'react-ga4';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import { createBrowserRouter, Navigate, RouterProvider } from 'react-router-dom';

import { undoDelete } from './actions/AppStoreActions';
import AppQueryProvider from './providers/Query';
Expand All @@ -30,6 +30,10 @@ const BrowserRouter = createBrowserRouter([
element: <Feedback />,
errorElement: <ErrorPage />,
},
{
path: '*',
element: <Navigate to="/" replace />,
},
]);

/**
Expand Down

0 comments on commit 3f9798b

Please sign in to comment.