fix(chapters): removed filters when no data

This commit is contained in:
glazk0 2024-09-17 18:34:03 +02:00
parent 66f16ec248
commit 56bae8c72f
No known key found for this signature in database
GPG key ID: E45BF177782B9FEB

View file

@ -102,8 +102,9 @@
{/if}
</div>
</header>
<div class="flex flex-col md:flex-row gap-2">
<div class="flex flex-col gap-2 md:flex-row">
<Input bind:value={name} placeholder="Rechercher un puzzle" />
{#if Object.keys(themes).length}
<Select.Root
multiple
selected={themeList.map((theme) => ({ label: theme, value: theme }))}
@ -124,6 +125,8 @@
{/each}
</Select.Content>
</Select.Root>
{/if}
{#if Object.keys(difficulties).length}
<Select.Root
multiple
selected={difficultyList.map((difficulty) => ({ label: difficulty, value: difficulty }))}
@ -144,6 +147,7 @@
{/each}
</Select.Content>
</Select.Root>
{/if}
</div>
<ul class="flex flex-col gap-2">
{#if !filteredPuzzles.length}