File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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}
You can’t perform that action at this time.
0 commit comments