Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pets): missing pets section #4

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 39 additions & 16 deletions src/lib/sections/stats/Pets.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,43 @@
{/each}
</Items>

<Collapsible.Root>
<Collapsible.Trigger>
<h4 class="text-xl capitalize text-text">Show More Pets</h4>
<br />
</Collapsible.Trigger>
<Collapsible.Content>
<Items>
{#each otherPets as pet}
<div>
<Item piece={pet} />
<p class="mt-2 text-center">LVL {pet.level.level}</p>
</div>
{/each}
</Items>
</Collapsible.Content>
</Collapsible.Root>
{#if otherPets.length > 0 || pets.missing.length > 0}
<div>
{#if otherPets.length > 0}
<Collapsible.Root>
<Collapsible.Trigger>
<h4 class="text-xl capitalize text-text">Show More Pets</h4>
<br />
</Collapsible.Trigger>
<Collapsible.Content>
<Items>
{#each otherPets as pet}
<div>
<Item piece={pet} />
<p class="mt-2 text-center">LVL {pet.level.level}</p>
</div>
{/each}
</Items>
</Collapsible.Content>
</Collapsible.Root>
{/if}
{#if pets.missing.length > 0}
<Collapsible.Root>
<Collapsible.Trigger>
<h4 class="text-xl capitalize text-text">Missing Pets</h4>
<br />
</Collapsible.Trigger>
<Collapsible.Content>
<Items>
{#each pets.missing as pet}
<div>
<Item piece={pet} />
</div>
{/each}
</Items>
</Collapsible.Content>
</Collapsible.Root>
{/if}
</div>
{/if}
</Items>