We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
pathname
_not-found
404
1 parent 874f8b4 commit 9ed23a4Copy full SHA for 9ed23a4
website/src/app/not-found.tsx
@@ -1,17 +1,19 @@
1
"use client"
2
3
import { usePathname } from "next/navigation"
4
+import { useMounted } from "nextra/hooks"
5
6
export default function Page() {
- const pathname = usePathname()?.replace(/\/$/, "")
7
+ const pathname = usePathname()
8
+ const mounted = useMounted()
9
10
const repo = {
11
origin: "https://github.com",
12
owner: "graphql",
13
name: "graphql.github.io",
14
}
15
- const title = `Found broken \`${pathname}\` link. Please fix!`
16
+ const title = `Found broken \`${mounted ? pathname?.replace(/\/$/, "") : ""}\` link. Please fix!`
17
const labels = "bug"
18
19
const url = `${repo.origin}/${repo.owner}/${
0 commit comments