From fcc4c3374d85b33755f852bcc559db0a8eb5115a Mon Sep 17 00:00:00 2001 From: Blaster4385 Date: Thu, 25 Aug 2022 11:44:08 +0530 Subject: Misc changes and add more translation --- admin/src/components/Error/Error.jsx | 29 +++++++++++++++++++++++++++++ admin/src/components/Error/Error.module.css | 19 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 admin/src/components/Error/Error.jsx create mode 100644 admin/src/components/Error/Error.module.css (limited to 'admin/src/components/Error') 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 ( + <> +
+ +

{message}

+
+ + ) +} + +export default Error diff --git a/admin/src/components/Error/Error.module.css b/admin/src/components/Error/Error.module.css new file mode 100644 index 0000000..d58d354 --- /dev/null +++ b/admin/src/components/Error/Error.module.css @@ -0,0 +1,19 @@ +.error { + display: flex; + height: 100vh; + width: 100vw; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.error__title { + font-family: 'Barlow', sans-serif; + font-weight: 400; + font-size: var(--font-large); + text-align: center; +} + +.error__image { + margin-left: 40px; +} -- cgit