diff options
author | Blaster4385 <[email protected]> | 2022-08-25 11:44:08 +0530 |
---|---|---|
committer | Blaster4385 <[email protected]> | 2022-08-25 11:44:08 +0530 |
commit | fcc4c3374d85b33755f852bcc559db0a8eb5115a (patch) | |
tree | 266005279ac7996b479e2cb3b5d48ccebd041290 /admin/src/components/Error/Error.jsx | |
parent | 3450e5ad9c59403b9ad75aa24e71a1b925f7bbcf (diff) |
Misc changes and add more translation
Diffstat (limited to 'admin/src/components/Error/Error.jsx')
-rw-r--r-- | admin/src/components/Error/Error.jsx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/admin/src/components/Error/Error.jsx b/admin/src/components/Error/Error.jsx new file mode 100644 index 0000000..110999b --- /dev/null +++ b/admin/src/components/Error/Error.jsx @@ -0,0 +1,29 @@ +import React, { useEffect } from 'react' +import { useNavigate } from 'react-router-dom' +import { initialUserData } from '../../constants/userData' +import { userContext } from '../../context/User' + +import styles from './Error.module.css' + +const Error = ({ message }) => { + const navigate = useNavigate() + useEffect(() => { + setTimeout(() => { + navigate('/') + }, 3000) + }, []) + + return ( + <> + <div className={styles.error}> + <img + src={`${process.env.PUBLIC_URL}/assets/images/error.svg`} + className={styles.error__image} + /> + <h1 className={styles.error__title}>{message}</h1> + </div> + </> + ) +} + +export default Error |