This commit is contained in:
Dariusz Niemczyk 2025-02-13 00:46:44 +01:00
parent f1caef1058
commit 3c5a17d086
No known key found for this signature in database

View file

@ -44,8 +44,8 @@ export function Nav({
entries.forEach(entry => {
const target = entry.target.id as keyof (typeof translations.pl)["nav"]
if (entry.isIntersecting) {
setActiveSection(target);
if (window.location.hash !== `#${target}` && history.replaceState) {
// setActiveSection(target);
if (history.replaceState) {
timeout = setTimeout(() => {
history.replaceState(null, "", `#${target}`)
}, 150)