summaryrefslogtreecommitdiff
path: root/client/src/pages/Error
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/pages/Error')
-rw-r--r--client/src/pages/Error/Error.jsx28
-rw-r--r--client/src/pages/Error/Error.module.css18
2 files changed, 46 insertions, 0 deletions
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 (
+ <>
+ <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
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;
+}