Rename global data arrays as plural by default
Easier for each loop and maps as to use singular
This commit is contained in:
@@ -28,16 +28,14 @@
|
||||
export async function load ({ page, session, fetch, context }) {
|
||||
const res = await fetchAPI(`
|
||||
query {
|
||||
location (filter: { status: { _eq: "published" }}) {
|
||||
locations: location (filter: { status: { _eq: "published" }}) {
|
||||
name
|
||||
slug
|
||||
coordinates
|
||||
country {
|
||||
name
|
||||
slug
|
||||
flag {
|
||||
id
|
||||
}
|
||||
flag { id }
|
||||
}
|
||||
date_updated
|
||||
photos (sort: "-date_created", limit: ${import.meta.env.VITE_PREVIEW_COUNT}) {
|
||||
@@ -49,24 +47,18 @@
|
||||
has_poster
|
||||
}
|
||||
|
||||
country (filter: { status: { _eq: "published" }}) {
|
||||
countries: country (filter: { status: { _eq: "published" }}) {
|
||||
name
|
||||
slug
|
||||
flag {
|
||||
id
|
||||
}
|
||||
locations {
|
||||
slug
|
||||
}
|
||||
flag { id }
|
||||
locations { id slug }
|
||||
}
|
||||
|
||||
continent {
|
||||
continents: continent {
|
||||
name
|
||||
slug
|
||||
rotation
|
||||
countries {
|
||||
slug
|
||||
}
|
||||
countries { id slug }
|
||||
}
|
||||
|
||||
settings {
|
||||
@@ -86,7 +78,10 @@
|
||||
shop {
|
||||
module_title
|
||||
module_text
|
||||
module_image { id title }
|
||||
module_image {
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
|
||||
# Count
|
||||
@@ -111,7 +106,7 @@
|
||||
props: {
|
||||
data: {
|
||||
...data,
|
||||
continent: filteredContinents,
|
||||
continents: filteredContinents,
|
||||
},
|
||||
count: {
|
||||
photos: data.photo_aggregated[0].count.id,
|
||||
|
||||
Reference in New Issue
Block a user