test1
This commit is contained in:
parent
f1caef1058
commit
3c5a17d086
|
|
@ -44,8 +44,8 @@ export function Nav({
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
const target = entry.target.id as keyof (typeof translations.pl)["nav"]
|
const target = entry.target.id as keyof (typeof translations.pl)["nav"]
|
||||||
if (entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
setActiveSection(target);
|
// setActiveSection(target);
|
||||||
if (window.location.hash !== `#${target}` && history.replaceState) {
|
if (history.replaceState) {
|
||||||
timeout = setTimeout(() => {
|
timeout = setTimeout(() => {
|
||||||
history.replaceState(null, "", `#${target}`)
|
history.replaceState(null, "", `#${target}`)
|
||||||
}, 150)
|
}, 150)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue