This pull request includes changes to the App.scala and utils/package.scala files to enhance the user experience by ensuring the page scrolls to the top when a new page is rendered. The primary changes involve importing necessary modules and adding a new utility function.
This pull request includes changes to the
App.scala
andutils/package.scala
files to enhance the user experience by ensuring the page scrolls to the top when a new page is rendered. The primary changes involve importing necessary modules and adding a new utility function.Enhancements to user experience:
src/main/scala/com/talestonini/App.scala
: AddedscrollToTop()
call in therender
method to ensure the new page is rendered at the top.src/main/scala/com/talestonini/utils/package.scala
: Added a new utility functionscrollToTop()
that scrolls the window to the top.Codebase adjustments:
src/main/scala/com/talestonini/App.scala
: ImportedscrollToTop
utility function.src/main/scala/com/talestonini/utils/package.scala
: Importedorg.scalajs.dom
to use thescrollTo
method in the new utility function.