Check if location has a poster on Shop
This commit is contained in:
@@ -36,9 +36,11 @@
|
|||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
{#each locations as { name, slug }}
|
{#each locations as { name, slug }}
|
||||||
<li class:is-active={slug === product.location.slug}>
|
{#if posters.find(poster => poster.location.slug === slug )}
|
||||||
<a href="/shop/poster-{slug}">{name}</a>
|
<li class:is-active={slug === product.location.slug}>
|
||||||
</li>
|
<a href="/shop/poster-{slug}">{name}</a>
|
||||||
|
</li>
|
||||||
|
{/if}
|
||||||
{/each}
|
{/each}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
Reference in New Issue
Block a user