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