aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/helpers')
-rw-r--r--client/src/app/helpers/utils.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/client/src/app/helpers/utils.ts b/client/src/app/helpers/utils.ts
index d9007dd77..a22507f46 100644
--- a/client/src/app/helpers/utils.ts
+++ b/client/src/app/helpers/utils.ts
@@ -144,8 +144,12 @@ function sortBy (obj: any[], key1: string, key2?: string) {
144 }) 144 })
145} 145}
146 146
147function scrollToTop () { 147function scrollToTop (behavior: 'auto' | 'smooth' = 'auto') {
148 window.scroll(0, 0) 148 window.scrollTo({
149 left: 0,
150 top: 0,
151 behavior
152 })
149} 153}
150 154
151function isInViewport (el: HTMLElement) { 155function isInViewport (el: HTMLElement) {