fix: dashboard profit color

This commit is contained in:
Vasily Zubarev
2025-03-17 21:53:44 +01:00
parent a247fe55f5
commit 92f3ad3203
2 changed files with 19 additions and 14 deletions

View File

@@ -61,7 +61,12 @@ export function ProjectsWidget({
<div className="text-sm font-medium text-muted-foreground">Profit</div>
<div className="text-2xl font-bold">
{Object.entries(statsPerProject[project.code]?.profitPerCurrency).map(([currency, total]) => (
<div key={currency} className="flex flex-col gap-2 items-center text-2xl font-bold text-green-500">
<div
key={currency}
className={`flex flex-col gap-2 items-center text-2xl font-bold ${
total >= 0 ? "text-green-500" : "text-red-500"
}`}
>
{formatCurrency(total, currency)}
</div>
))}