import * as React from 'react' ; import { Route , RouteComponentProps } from 'react-router-dom' ; import { Page , PageContainer } from 'components' ; type Props = { code : number ; children : React . ReactNode ; } ; const Status = ( { code , children } ) => { const render = ( { staticContext } ) => { if ( staticContext ) { staticContext . statusCode = code ; } return children ; } ; return < Route render = { render } />; } ; export default function NotFoundPage ( ) { return ( < Status code = { 404 } > < Page > < PageContainer > < h1 > Page not found < /h1> < /PageContainer> < /Page> < /Status>); }