Add 404 page
This commit is contained in:
@@ -11,6 +11,7 @@ import { useUserContext } from '../Contexts/UserContext';
|
||||
const SignInForm = React.lazy(() => import('../SignInForm'));
|
||||
const SignUpForm = React.lazy(() => import('../SignUpForm'));
|
||||
const FileUploadForm = React.lazy(() => import('../FileUploadForm'));
|
||||
const PageNotFound = React.lazy(() => import('../404'));
|
||||
|
||||
const SiteRoutes = () => {
|
||||
const { token } = useUserContext();
|
||||
@@ -22,6 +23,7 @@ const SiteRoutes = () => {
|
||||
<AuthRoute path="/" exact render={() => <SignInForm />} type={TYPES.GUEST} token={token} />
|
||||
<AuthRoute path="/signup" exact render={() => <SignUpForm />} type={TYPES.GUEST} token={token} />
|
||||
<AuthRoute path="/home" render={() => <FileUploadForm />} type={TYPES.PROTECTED} token={token} />
|
||||
<PageNotFound />
|
||||
</Switch>
|
||||
</BrowserRouter>
|
||||
</Suspense>
|
||||
|
||||
Reference in New Issue
Block a user