diff --git a/src/components/molecules/PhotoCard.svelte b/src/components/molecules/PhotoCard.svelte index caae2fe..3597134 100644 --- a/src/components/molecules/PhotoCard.svelte +++ b/src/components/molecules/PhotoCard.svelte @@ -6,6 +6,8 @@ export let url: string = undefined export let title: string = undefined export let location: any = undefined + export let city: string = undefined + const sizes = { small: { width: 224 }, @@ -33,7 +35,7 @@ height={24} alt="Flag of {location.country.name}" /> -

{title} - {location.name}, {location.city ? `, ${location.city}, ` : ''}{location.country.name}

+

{title} - {city ? `${city}, ` : ''}{location.name}, {location.country.name}

{/if} diff --git a/src/routes/index.svelte b/src/routes/index.svelte index 9dca1fe..b055c5d 100644 --- a/src/routes/index.svelte +++ b/src/routes/index.svelte @@ -94,13 +94,14 @@
- {#each photos as { slug, title, image, location }} + {#each photos as { slug, title, image, location, city }} {/each}