From ea2162c2b90a55421bdd84d1c6c17a9915372b1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sun, 17 Oct 2021 13:41:38 +0200 Subject: [PATCH] Fix Location page total photos amount --- src/routes/[country]/[location]/index.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/routes/[country]/[location]/index.svelte b/src/routes/[country]/[location]/index.svelte index 131a29d..d7fa058 100644 --- a/src/routes/[country]/[location]/index.svelte +++ b/src/routes/[country]/[location]/index.svelte @@ -219,8 +219,7 @@ filter: { slug: { _eq: "${location}" }, status: { _eq: "published" }, - }, - limit: ${import.meta.env.VITE_LIST_AMOUNT}, + } ) { id name @@ -264,7 +263,8 @@ `) const { data } = res - const locationPhotosCount = data.total_published.find(({ group }: any) => group.id === data.location.id) + const locationId = data.location[0].id + const locationPhotosCount = data.total_published.find(({ group }: any) => group.location === Number(locationId)) return { props: {