From 851148c4212ba6721c602c92b247fbc0f9e261f9 Mon Sep 17 00:00:00 2001 From: dertyp7 Date: Sun, 14 Jan 2024 12:48:47 +0100 Subject: [PATCH] Fix hash navigation issue in App component --- src/App.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 40c11ed..9bbcf61 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -16,7 +16,11 @@ export default function App() { (entries) => { entries.forEach((entry) => { if (entry.isIntersecting) { - window.location.hash = entry.target.id; + if (entry.target.id === "about") { + window.location.hash = ""; + } else { + window.location.hash = entry.target.id; + } } }); },