mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-06-08 00:24:21 +02:00
24 lines
644 B
TypeScript
Executable File
24 lines
644 B
TypeScript
Executable File
import { memo } from "react"
|
|
import { RouteComponentProps } from "react-router-dom"
|
|
import { Helmet } from "react-helmet"
|
|
|
|
import styles from "./styles.module.scss"
|
|
|
|
type Props = RouteComponentProps
|
|
|
|
const NotFound = ({ staticContext }: Props) => {
|
|
// We have to check if staticContext exists
|
|
// because it will be undefined if rendered through a BrowserRoute
|
|
/* istanbul ignore next */
|
|
if (staticContext) staticContext.statusCode = 404
|
|
|
|
return (
|
|
<div className={styles.NotFound}>
|
|
<Helmet title="Oops" />
|
|
<p>Oops, Page was not found!</p>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default memo(NotFound)
|