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: {