Skip to content

Commit 4937447

Browse files
committed
.
1 parent 6623328 commit 4937447

1 file changed

Lines changed: 10 additions & 19 deletions

File tree

components/404.tsx

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use client'
22

33

4-
import { useEffect, useState } from 'react';
5-
import { redirect, usePathname, useRouter } from 'next/navigation'
4+
5+
import { redirect, usePathname } from 'next/navigation'
66

77

88

@@ -11,27 +11,16 @@ export default function NotFound404() {
1111

1212

1313
const pathname = usePathname()
14-
const router = useRouter()
15-
const [ready, setReady] = useState(false)
16-
17-
18-
19-
useEffect(() => {
20-
if (pathname.toLowerCase().startsWith('/team') && pathname !== '/team') {
21-
router.replace('/team');
22-
} else {
23-
setReady(true);
24-
}
25-
}, [pathname]);
26-
27-
28-
29-
3014
if (
3115
pathname.toLowerCase() == '/'
3216
) {
3317
redirect('/legacy/index.html')
3418
}
19+
if (
20+
pathname.toLowerCase().startsWith('/team')
21+
) {
22+
redirect('/team')
23+
}
3524
if (
3625
pathname.toLowerCase() == '/recruit' ||
3726
pathname.toLowerCase() == '/recruit/'
@@ -257,5 +246,7 @@ export default function NotFound404() {
257246

258247

259248
redirect('/missing')
260-
return null;
249+
return (
250+
<main className='w-full'></main>
251+
)
261252
}

0 commit comments

Comments
 (0)