Fix city on PhotoCard
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
export let url: string = undefined
|
export let url: string = undefined
|
||||||
export let title: string = undefined
|
export let title: string = undefined
|
||||||
export let location: any = undefined
|
export let location: any = undefined
|
||||||
|
export let city: string = undefined
|
||||||
|
|
||||||
|
|
||||||
const sizes = {
|
const sizes = {
|
||||||
small: { width: 224 },
|
small: { width: 224 },
|
||||||
@@ -33,7 +35,7 @@
|
|||||||
height={24}
|
height={24}
|
||||||
alt="Flag of {location.country.name}"
|
alt="Flag of {location.country.name}"
|
||||||
/>
|
/>
|
||||||
<p>{title} - {location.name}, {location.city ? `, ${location.city}, ` : ''}{location.country.name}</p>
|
<p>{title} - {city ? `${city}, ` : ''}{location.name}, {location.country.name}</p>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -94,13 +94,14 @@
|
|||||||
|
|
||||||
<section class="homepage__photos">
|
<section class="homepage__photos">
|
||||||
<div class="homepage__collage">
|
<div class="homepage__collage">
|
||||||
{#each photos as { slug, title, image, location }}
|
{#each photos as { slug, title, image, location, city }}
|
||||||
<PhotoCard
|
<PhotoCard
|
||||||
id={image.id}
|
id={image.id}
|
||||||
alt={title}
|
alt={title}
|
||||||
url="/{location.country.slug}/{location.slug}/{slug}"
|
url="/{location.country.slug}/{location.slug}/{slug}"
|
||||||
title={title}
|
title={title}
|
||||||
location={location}
|
location={location}
|
||||||
|
city={city}
|
||||||
/>
|
/>
|
||||||
{/each}
|
{/each}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user