Add photo's city to Postcard on Photos grid

This commit is contained in:
2021-11-14 19:51:31 +01:00
parent db7307669d
commit cf6afd832e
2 changed files with 4 additions and 3 deletions

View File

@@ -156,6 +156,7 @@
flag { id }
}
}
city
}
}
`)
@@ -293,7 +294,7 @@
<div class="grid container">
{#if photos.length}
<div class="photos__grid">
{#each photos as { image, slug, location, title }, index}
{#each photos as { image, slug, location, title, city }, index}
<figure class="photo shadow-photo">
<a href="/{location.country.slug}/{location.slug}/{slug}">
<Image
@@ -311,7 +312,7 @@
<figcaption>
<PostCard
street={title}
location={location.name}
location={city ? `${city}, ${location.name}` : location.name}
region={location.region}
country={location.country.name}
flagId={location.country.flag.id}
@@ -400,6 +401,7 @@
flag { id }
}
}
city
date_created
}