From 8654e43af587ddf864a7bb889a44c4edad05052b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Pe=CC=81ault?= Date: Sun, 21 Nov 2021 12:08:31 +0100 Subject: [PATCH] Fix city on PhotoCard --- src/components/molecules/PhotoCard.svelte | 4 +++- src/routes/index.svelte | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) 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}