add 404 page

This commit is contained in:
Abhinav 2022-01-21 16:48:25 +05:30
parent c26db1184d
commit 9fa5662880
2 changed files with 23 additions and 0 deletions

22
src/pages/404.tsx Normal file
View 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>
);
}

View file

@ -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;