Smooth scroll to top if active screen selected in web UI (#175)

* Smooth scroll to top if active screen selected in web UI

* Use fullname repo

---------

Co-authored-by: agathanonymous <agatha@juggalol.com>
Co-authored-by: Brahim Hadriche <brahim.hadriche@gmail.com>
This commit is contained in:
authored and GitHub committed 2023-10-21 20:13:14 -04:00
1 parent ceeb2bf37b
commit 7bfe657401
2 files changed
+7

No files matched your search

+1
View File
@@ -17,6 +17,7 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- name: Configure repo
run: |
@@ -8,6 +8,12 @@
function setScreen(screen: AppState["screen"]) {
appStateStore.update((state) => {
if (state.screen === screen) {
window.scrollTo({
top: 0,
behavior: "smooth",
});
}
state.screen = screen;
return state;
});