File size: 1,159 Bytes
f5071ca |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
import React from 'react';
import { Heading, Image, Text, VStack } from '@chakra-ui/react';
import dev_ghost from '../assets/images/devGhost.webp';
import { useNavigate } from 'react-router-dom';
import { useEffect } from 'react';
const Error = () => {
const navigate = useNavigate();
useEffect(() => {
const header = document.querySelector('.header');
const footer = document.querySelector('.footer');
if (header) {
header.style.display = 'none';
}
if (footer) {
footer.style.display = 'none';
}
}, []);
return (
<VStack justify='center' h='calc(100vh - 120px)'>
<Image src={dev_ghost} alt='dev_ghost' />
<Heading mt='0 !important' fontSize='5xl'>
404
</Heading>
<Heading mt='0 !important' fontSize='2xl'>
Page not found !
</Heading>
<Text
color='light.primary'
cursor='pointer'
_hover={{ color: 'rgb(103 115 237 / 91%)' }}
onClick={() => navigate('/')}
>
Back to home
</Text>
</VStack>
);
};
export default Error;
|