From 7e46350106e1b6a8f399aa41fbe2a40225effbef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Wed, 31 Aug 2022 18:47:28 +0200 Subject: [PATCH] Make Location page changing data reactive --- src/routes/[country]/[location]/+page.svelte | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/routes/[country]/[location]/+page.svelte b/src/routes/[country]/[location]/+page.svelte index 93111b3..87e9af1 100644 --- a/src/routes/[country]/[location]/+page.svelte +++ b/src/routes/[country]/[location]/+page.svelte @@ -27,9 +27,10 @@ export let data: PageData + let { photos, totalPhotos }: { photos: any[], totalPhotos: number } = data + $: ({ photos, totalPhotos } = data) + const { location, product = undefined }: { location: any, totalPhotos: number, product: any } = data const { params } = $page - let { photos }: { photos: any[] } = data - const { location, totalPhotos, product = undefined }: { location: any, totalPhotos: number, product: any } = data dayjs.extend(relativeTime)