Add 404 page

This commit is contained in:
jwu-fisker
2021-01-07 21:34:39 -08:00
parent d2d7638e81
commit ab0453c09b
4 changed files with 73 additions and 9 deletions

View File

@@ -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>