From 1926a54d1f7b8bc1ed690aaf8e3b679b41edce7b Mon Sep 17 00:00:00 2001 From: rohan09-raj Date: Sat, 20 Aug 2022 21:52:57 +0530 Subject: enrollment improvements --- client/src/pages/Error/Error.jsx | 28 ++++++++++++++++++++++++++++ client/src/pages/Error/Error.module.css | 18 ++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 client/src/pages/Error/Error.jsx create mode 100644 client/src/pages/Error/Error.module.css (limited to 'client/src/pages/Error') diff --git a/client/src/pages/Error/Error.jsx b/client/src/pages/Error/Error.jsx new file mode 100644 index 0000000..5d06226 --- /dev/null +++ b/client/src/pages/Error/Error.jsx @@ -0,0 +1,28 @@ +import React, { useEffect } from 'react' +import { useNavigate } from 'react-router-dom' + +import styles from './Error.module.css' + +const Error = ({ message }) => { + const navigate = useNavigate() + + useEffect(() => { + setTimeout(() => { + navigate('/') + }, 3000) + }, []) + + return ( + <> +
+ +

{message}

+
+ + ) +} + +export default Error diff --git a/client/src/pages/Error/Error.module.css b/client/src/pages/Error/Error.module.css new file mode 100644 index 0000000..d66c6b7 --- /dev/null +++ b/client/src/pages/Error/Error.module.css @@ -0,0 +1,18 @@ +.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); +} + +.error__image { + margin-left: 40px; +} -- cgit