add condition if zero trends , hide the timeframe

This commit is contained in:
Khafid Prayoga
2025-08-12 14:58:29 +07:00
parent cc26415486
commit 949aa718b6
+1 -1
View File
@@ -53,7 +53,7 @@ const isTrending = computed<boolean>(() => (props.stat?.trend ?? 0) > 0)
<div class="text-2xl font-bold">
{{ props.stat.metric.toLocaleString('id-ID') }}
</div>
<p class="text-muted-foreground flex items-center gap-1 text-xs">
<p v-if="props.stat.trend !== 0" class="text-muted-foreground flex items-center gap-1 text-xs">
<component
:is="isTrending ? ChevronUp : ChevronDown"
:class="cn('h-4 w-4', { 'text-green-500': isTrending }, { 'text-red-500': !isTrending })"