Fix Location page total photos amount
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user