File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
'use client' ;
2
2
3
+ import { useEffect , useState } from 'react' ;
3
4
import { Button } from '@radix-ui/themes' ;
4
- import { usePathname } from 'next/navigation' ;
5
5
6
6
import { Header } from 'sentry-docs/components/header' ;
7
7
import { Search } from 'sentry-docs/components/search' ;
8
8
9
9
export default function NotFound ( ) {
10
- const pathname = usePathname ( ) ?? '/' ;
11
- const brokenUrl = `https://docs.sentry.io${ pathname } ` ;
10
+ const [ pathname , setPathname ] = useState ( '' ) ;
11
+ const [ host , setHost ] = useState ( '' ) ;
12
+ useEffect ( ( ) => {
13
+ setPathname ( window . location . pathname ) ;
14
+ setHost ( window . location . host ) ;
15
+ } , [ ] ) ;
16
+ const brokenUrl = `${ host } ${ pathname } ` ;
12
17
const reportUrl = `https://github.com/getsentry/sentry-docs/issues/new?template=issue-platform-404.yml&title=🔗 404 Error&url=${ brokenUrl } ` ;
13
18
return (
14
19
< div className = "tw-app" >
You can’t perform that action at this time.
0 commit comments