Skip to content

Commit

Permalink
Fix deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
MaXal committed May 24, 2024
1 parent 2b608d2 commit aa69b68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dashboard/app/src/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function createAndConfigureRouter(): Router {
setTimeout(() => {
const element = document.querySelector(to.hash)
const yOffset = -60 // Adjust this value as needed for your fixed header or other elements
const y = (element?.getBoundingClientRect().top ?? 0) + window.pageYOffset + yOffset
const y = (element?.getBoundingClientRect().top ?? 0) + window.scrollY + yOffset
window.scrollTo({ top: y, behavior: "smooth" })
resolve({ left: 0, top: y })
}, 600) // Delay to ensure the element is rendered
Expand Down

0 comments on commit aa69b68

Please sign in to comment.