Skip to content

Commit

Permalink
bugfix(static page): fix inline scroll height (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
manojava-gk authored Jul 12, 2023
1 parent d24035d commit 53425c2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ export default function TitleDescriptionAndSectionlink({
const navigateTo = (link: { internal: boolean; id: string }) => {
if (link.internal) {
const element = document.getElementById(link.id)
const top = element?.offsetTop
const top = element && element.offsetTop - 200
window.scrollTo({
top: top,
top: top ?? 0,
behavior: 'smooth',
})
} else {
Expand Down

0 comments on commit 53425c2

Please sign in to comment.