Skip to content

Commit e4dca75

Browse files
Update 404.tsx
1 parent a30008a commit e4dca75

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

docs-v2/pages/404.tsx

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
1-
import { useEffect } from 'react'
2-
import { useRouter } from 'next/router'
1+
import { useEffect } from "react"
2+
import { useRouter } from "next/router"
33

44
export default function Custom404() {
55
const router = useRouter()
6-
6+
77
useEffect(() => {
88
// 302 redirect (temporary) to home page
9-
router.replace('/')
10-
}, [router])
11-
9+
router.replace("/")
10+
}, [
11+
router,
12+
])
13+
1214
return (
13-
<div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100vh' }}>
15+
<div style={{
16+
display: "flex",
17+
justifyContent: "center",
18+
alignItems: "center",
19+
height: "100vh",
20+
}}>
1421
<div>
1522
<h1>Page not found</h1>
1623
<p>Redirecting to home page...</p>
1724
</div>
1825
</div>
1926
)
20-
}
27+
}

0 commit comments

Comments
 (0)