add 404 to accounts.

This commit is contained in:
Simon Larsen
2022-09-28 14:52:51 +01:00
parent 5b6bca9cf8
commit 7d047d28b1
3 changed files with 85 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import {
useParams,
} from 'react-router-dom';
import LoginPage from './Pages/Login';
import NotFound from './Pages/NotFound';
import SsoLoginPage from './Pages/SsoLogin';
import ForgotPasswordPage from './Pages/ForgotPassword';
import RegisterPage from './Pages/Register';
@@ -40,6 +41,15 @@ function App(): ReactElement {
path="/accounts/verify-email/:token"
element={<VerifyEmail />}
/>
{/* 👇️ only match this when no other routes match */}
<Route
path="*"
element={
<NotFound
/>
}
/>
</Routes>
</div>
);

View File

@@ -0,0 +1,73 @@
import React, { FunctionComponent } from 'react';
import Route from 'Common/Types/API/Route';
import Link from 'CommonUI/src/Components/Link/Link';
import { LOGIN_API_URL } from '../Utils/ApiPaths';
import URL from 'Common/Types/API/URL';
const LoginPage: FunctionComponent = () => {
const apiUrl: URL = LOGIN_API_URL;
return (
<div className="auth-page">
<div className="container-fluid p-0">
<div className="row g-0">
<div className="col-xxl-4 col-lg-4 col-md-3"></div>
<div className="col-xxl-4 col-lg-4 col-md-6">
<div className="auth-full-page-content d-flex p-sm-5 p-4">
<div className="w-100">
<div className="d-flex flex-column h-100">
<div className="auth-content my-auto">
<div className="text-center">
<h5 className="mb-0">
Page Not Found
</h5>
<p className="text-muted mt-2 mb-0">
Page you're looking for is not found.{' '}
</p>
<p className="text-muted mb-0">
Don&apos;t have an account?{' '}
<Link
to={
new Route(
'/accounts/register'
)
}
className="underline-on-hover text-primary fw-semibold"
>
Register.
</Link>
</p>
<p className="text-muted mb-0">
Have an account?{' '}
<Link
to={
new Route(
'/accounts/login'
)
}
className="underline-on-hover text-primary fw-semibold"
>
Login.
</Link>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
<div className="col-xxl-4 col-lg-4 col-md-3"></div>
</div>
</div>
</div>
);
};
export default LoginPage;

View File

@@ -6,8 +6,8 @@ const Overview: FunctionComponent<PageComponentProps> = (
_props: PageComponentProps
): ReactElement => {
return (
<Page title={'Page Not Found'}>
<p>Page you are looking for does not exist.</p>
<Page title={'Overview'}>
<p>Overview</p>
</Page>
);
};