refactor: remove auto-scroll on stations loading
Disabled the watch hook that scrolled the viewport when station results were loading. The 40px nudge disrupted user focus and was not needed for usability.
This commit is contained in:
@@ -448,12 +448,12 @@ const PRICE_SUFFIX = { monthly: '/mo', annual: '/yr' }
|
|||||||
const { stations, meta, prediction, loading, error, search, reset } = useStations()
|
const { stations, meta, prediction, loading, error, search, reset } = useStations()
|
||||||
const showFullPrediction = computed(() => Boolean(prediction.value) && !prediction.value.tier_locked)
|
const showFullPrediction = computed(() => Boolean(prediction.value) && !prediction.value.tier_locked)
|
||||||
|
|
||||||
watch(loading, (isLoading) => {
|
// watch(loading, (isLoading) => {
|
||||||
if (!isLoading) return
|
// if (!isLoading) return
|
||||||
nextTick(() => {
|
// nextTick(() => {
|
||||||
window.scrollBy({ top: 40, behavior: 'smooth' })
|
// window.scrollBy({ top: 40, behavior: 'smooth' })
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
|
|
||||||
const searchOrigin = computed(() => {
|
const searchOrigin = computed(() => {
|
||||||
if (meta.value?.lat != null && meta.value?.lng != null) {
|
if (meta.value?.lat != null && meta.value?.lng != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user