Show only published linked location on credits

This commit is contained in:
2022-03-21 18:45:59 +01:00
parent 7c369794c1
commit f178f504c9

View File

@@ -121,19 +121,21 @@
</dt> </dt>
<dd> <dd>
<ul> <ul>
{#each location as { location_id: { name, slug: slugLocation, country: { slug: slugCountry, flag }}}, index} {#each location as loc}
{#if loc.location_id}
<li> <li>
<a href="/{slugCountry}/{slugLocation}" sveltekit:noscroll tabindex="0"> <a href="/{loc.location_id.country.slug}/{loc.location_id.slug}" sveltekit:noscroll tabindex="0">
<Image <Image
id={flag.id} id={loc.location_id.country.flag.id}
sizeKey="square-small" sizeKey="square-small"
width={16} width={16}
height={16} height={16}
alt="Flag of {slugCountry}" alt="Flag of {loc.location_id.country.slug}"
/> />
<span>{name}</span> <span>{loc.location_id.name}</span>
</a> </a>
</li> </li>
{/if}
{/each} {/each}
</ul> </ul>
</dd> </dd>
@@ -165,7 +167,7 @@
name name
website website
location { location {
location_id { location_id (filter: { status: { _eq: "published" }}) {
name name
slug slug
country { country {
@@ -179,7 +181,6 @@
} }
} }
`) `)
const { data } = res const { data } = res
return { return {