From 514bf1663a779b425543c6ed248390fb61e9138a Mon Sep 17 00:00:00 2001 From: Benjie Gillam Date: Fri, 1 Nov 2024 10:34:19 +0000 Subject: [PATCH 1/2] Where was the broken link from? --- src/app/not-found.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index 6c5d0a22d0..b17b75c7dd 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -13,7 +13,8 @@ export default function Page() { name: "graphql.github.io", } - const title = `Found broken \`${mounted ? pathname?.replace(/\/$/, "") : ""}\` link. Please fix!` + const referrer = document?.referrer + const title = `Found broken \`${mounted ? pathname?.replace(/\/$/, "") : ""}\` link${referrer ? ` from \`${referrer}\`` : ""}. Please fix!` const labels = "bug" const url = `${repo.origin}/${repo.owner}/${ From c6bddce45be6cc2c7ebb3b765d2eb1de2abb3476 Mon Sep 17 00:00:00 2001 From: Benjie Date: Fri, 1 Nov 2024 14:36:47 +0000 Subject: [PATCH 2/2] Update src/app/not-found.tsx Co-authored-by: Dimitri POSTOLOV --- src/app/not-found.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/not-found.tsx b/src/app/not-found.tsx index b17b75c7dd..3a1df29a13 100644 --- a/src/app/not-found.tsx +++ b/src/app/not-found.tsx @@ -13,7 +13,7 @@ export default function Page() { name: "graphql.github.io", } - const referrer = document?.referrer + const referrer = mounted && document.referrer const title = `Found broken \`${mounted ? pathname?.replace(/\/$/, "") : ""}\` link${referrer ? ` from \`${referrer}\`` : ""}. Please fix!` const labels = "bug"