@@ -8,7 +8,7 @@ import routes from './constants/routes'
88import activeGameState from './state/activeGameState'
99import AuthService from './services/AuthService'
1010import canViewPage from './utils/canViewPage'
11- import NotFoundHandler from './components/NotFoundHandler '
11+ import IntendedRouteHandler from './components/IntendedRouteHandler '
1212
1313const Login = lazy ( ( ) => import ( /* webpackChunkName: 'login' */ './pages/Login' ) )
1414const Dashboard = lazy ( ( ) => import ( /* webpackChunkName: 'dashboard' */ './pages/Dashboard' ) )
@@ -41,8 +41,9 @@ const ForgotPassword = lazy(() => import(/* webpackChunkName: 'forgot-password'
4141const ResetPassword = lazy ( ( ) => import ( /* webpackChunkName: 'reset-password' */ './pages/ResetPassword' ) )
4242const PlayerSaves = lazy ( ( ) => import ( /* webpackChunkName: 'player-saves' */ './pages/PlayerSaves' ) )
4343const PlayerSaveContent = lazy ( ( ) => import ( /* webpackChunkName: 'player-save-content' */ './pages/PlayerSaveContent' ) )
44+ const NotFound = lazy ( ( ) => import ( /* webpackChunkName: 'not-found' */ './pages/NotFound' ) )
4445
45- function Router ( { intendedUrl } ) {
46+ function Router ( { intendedRoute } ) {
4647 const user = useRecoilValue ( userState )
4748 const activeGame = useRecoilValue ( activeGameState )
4849
@@ -60,7 +61,7 @@ function Router({ intendedUrl }) {
6061 < Route exact path = { routes . forgotPassword } element = { < ForgotPassword /> } />
6162 < Route exact path = { routes . resetPassword } element = { < ResetPassword /> } />
6263
63- < Route path = '*' element = { < NotFoundHandler baseRoute = { routes . login } intendedUrl = { intendedUrl } /> } />
64+ < Route path = '*' element = { < IntendedRouteHandler intendedRoute = { intendedRoute } /> } />
6465 </ Routes >
6566 </ main >
6667 }
@@ -99,7 +100,7 @@ function Router({ intendedUrl }) {
99100 </ >
100101 }
101102
102- < Route path = '*' element = { < NotFoundHandler baseRoute = { routes . dashboard } intendedUrl = { intendedUrl } /> } />
103+ < Route path = '*' element = { < NotFound /> } />
103104 </ Routes >
104105 </ main >
105106 </ div >
@@ -109,7 +110,7 @@ function Router({ intendedUrl }) {
109110}
110111
111112Router . propTypes = {
112- intendedUrl : PropTypes . string
113+ intendedRoute : PropTypes . string
113114}
114115
115116export default Router
0 commit comments