commit
aa45ddc3a9
22
src/pages/404.tsx
Normal file
22
src/pages/404.tsx
Normal file
|
@ -0,0 +1,22 @@
|
|||
import Container from 'components/Container';
|
||||
import React, { useContext, useEffect, useState } from 'react';
|
||||
import constants from 'utils/strings/constants';
|
||||
import { AppContext } from './_app';
|
||||
|
||||
export default function NotFound() {
|
||||
const appContext = useContext(AppContext);
|
||||
const [loading, setLoading] = useState(true);
|
||||
useEffect(() => {
|
||||
appContext.showNavBar(true);
|
||||
setLoading(false);
|
||||
}, []);
|
||||
return (
|
||||
<Container>
|
||||
{loading ? (
|
||||
<span className="sr-only">Loading...</span>
|
||||
) : (
|
||||
constants.NOT_FOUND
|
||||
)}
|
||||
</Container>
|
||||
);
|
||||
}
|
|
@ -623,6 +623,7 @@ const englishConstants = {
|
|||
CUSTOM_TIME: 'custom time',
|
||||
REOPEN_PLAN_SELECTOR_MODAL: 're-open plans',
|
||||
OPEN_PLAN_SELECTOR_MODAL_FAILED: 'failed to open plans',
|
||||
NOT_FOUND: '404 not found',
|
||||
};
|
||||
|
||||
export default englishConstants;
|
||||
|
|
Loading…
Reference in a new issue