Go to new page when changing location on the Shop switcher

This commit is contained in:
2021-11-08 14:37:36 +01:00
parent 11ff9291d2
commit 0475e3f61e

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { page } from '$app/stores'
import { goto } from '$app/navigation'
import { shopLocations } from '$utils/stores/shop'
export let isOver: boolean = false
@@ -14,7 +15,7 @@
// Quick location change
const quickLocationChange = ({ target: { value }}: any) => {
const newPath = $page.path.split('-')[0] + `-${value}`
// goto(newPath, { replaceState: true, noscroll: true, keepfocus: true })
goto(newPath, { replaceState: true, noscroll: true, keepfocus: true })
}
</script>