fix(homepage): show stats placeholder when database is empty
The stats recomputation task populates the cache with zero values on startup, causing build_stat_cards() to return 6 cards even with an empty database. Gate the stats section on stats.is_empty() in addition to stat_cards.is_empty() so placeholders display correctly.
This commit is contained in:
parent
2a3f9220c2
commit
6493c6495a
1 changed files with 1 additions and 1 deletions
|
|
@ -241,7 +241,7 @@
|
||||||
>View all stats →</a
|
>View all stats →</a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
{% if !stat_cards.is_empty() %}
|
{% if !stats.is_empty() && !stat_cards.is_empty() %}
|
||||||
<chip-scroll class="relative block">
|
<chip-scroll class="relative block">
|
||||||
<button type="button" aria-label="Scroll left"
|
<button type="button" aria-label="Scroll left"
|
||||||
class="hidden absolute -left-4 top-1/2 z-10 -translate-y-1/2 items-center justify-center rounded-full border bg-surface p-1.5 text-text-muted shadow-sm transition hover:text-text"
|
class="hidden absolute -left-4 top-1/2 z-10 -translate-y-1/2 items-center justify-center rounded-full border bg-surface p-1.5 text-text-muted shadow-sm transition hover:text-text"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue