Skip to content

Commit

Permalink
fix: 🐛 better home label show / hide logic
Browse files Browse the repository at this point in the history
  • Loading branch information
flixlix committed Apr 14, 2024
1 parent e78c041 commit d89d28c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ export const homeElement = (
individual,
}: Home
) => {
const showHomeLabel = individual.filter((i) => i.has).length <= 1;

return html`<div class="circle-container home">
<div
class="circle"
Expand Down Expand Up @@ -108,11 +110,7 @@ export const homeElement = (
/>
</svg>
</div>
${
individual?.length > 1 && showLine(config, individual?.[1]?.state || 0)
? html`<span class="label"></span>`
: html`<span class="label">${home.name}</span>`
}
${!showHomeLabel ? html`<span class="label"></span>` : html`<span class="label">${home.name}</span>`}
</div>
</div>`;
};

0 comments on commit d89d28c

Please sign in to comment.