summaryrefslogtreecommitdiff
path: root/client/src/pages/Error/Error.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/pages/Error/Error.jsx')
-rw-r--r--client/src/pages/Error/Error.jsx28
1 files changed, 28 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