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}
<li> {#if loc.location_id}
<a href="/{slugCountry}/{slugLocation}" sveltekit:noscroll tabindex="0"> <li>
<Image <a href="/{loc.location_id.country.slug}/{loc.location_id.slug}" sveltekit:noscroll tabindex="0">
id={flag.id} <Image
sizeKey="square-small" id={loc.location_id.country.flag.id}
width={16} sizeKey="square-small"
height={16} width={16}
alt="Flag of {slugCountry}" height={16}
/> alt="Flag of {loc.location_id.country.slug}"
<span>{name}</span> />
</a> <span>{loc.location_id.name}</span>
</li> </a>
</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 {