mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
add 404 to accounts.
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
73
Accounts/src/Pages/NotFound.tsx
Normal file
73
Accounts/src/Pages/NotFound.tsx
Normal 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'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;
|
||||
@@ -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>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user