Skip to content

Commit

Permalink
Merge pull request #2150 from DuckySoLucky/fixHideMissingPets
Browse files Browse the repository at this point in the history
fix: hide missing pets if there r none
  • Loading branch information
metalcupcake5 authored Jan 5, 2024
2 parents dcfd53e + e1145bd commit d9f0c2f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions views/sections/stats/pets.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,16 @@
<% } %>
<!-- Missing Pets -->
<button class="stat-sub-header extender" aria-controls="missing-pets" aria-expanded="false">Missing Pets</button>
<div class="pieces extendable" id="missing-pets">
<% for (const [index, pet] of calculated.pets.missing.entries()) { %>
<div tabindex="0" data-missing-pet-index="<%= index %>" class="rich-item piece piece-<%= pet.rarity %>-bg missing-pet">
<div style='background-image: url("<%= pet.texture_path %>")' class="piece-icon item-icon custom-icon"></div>
</div>
<% } %>
</div>
<% if (calculated.pets.missing.length > 0) { %>
<button class="stat-sub-header extender" aria-controls="missing-pets" aria-expanded="false">Missing Pets</button>
<div class="pieces extendable" id="missing-pets">
<% for (const [index, pet] of calculated.pets.missing.entries()) { %>
<div tabindex="0" data-missing-pet-index="<%= index %>" class="rich-item piece piece-<%= pet.rarity %>-bg missing-pet">
<div style='background-image: url("<%= pet.texture_path %>")' class="piece-icon item-icon custom-icon"></div>
</div>
<% } %>
</div>
<% } %>
</p>
</div>
<% } %>

0 comments on commit d9f0c2f

Please sign in to comment.