Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TarasKachmar2022 committed Mar 8, 2024
1 parent 6d0b139 commit de983a5
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/js/smooth-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ document.querySelectorAll('a.site-nav__link').forEach(link => {

window.scrollBy({ top: offsetPosition, behavior: 'smooth' });
});
});

function topOffsetSelector() {
const viewportWidth = window.innerWidth;
function topOffsetSelector() {
const viewportWidth = window.innerWidth;

if (viewportWidth >= 768) {
topOffset = 82;
return topOffset;
} else {
topOffset = 104;
return topOffset;
if (viewportWidth >= 768) {
topOffset = 82;
return topOffset;
} else {
topOffset = 104;
return topOffset;
}
}
}
});

0 comments on commit de983a5

Please sign in to comment.