Go to new page when changing location on the Shop switcher
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user