diff --git a/frontend/apps/artcraft-dashboard/src/pages/SpendEvents.tsx b/frontend/apps/artcraft-dashboard/src/pages/SpendEvents.tsx index 9c07d8dbac..4ff9c7e7d1 100644 --- a/frontend/apps/artcraft-dashboard/src/pages/SpendEvents.tsx +++ b/frontend/apps/artcraft-dashboard/src/pages/SpendEvents.tsx @@ -17,7 +17,9 @@ import { import { useTableHeight } from "@/hooks/useTableHeight"; import { IconAlertCircle, + IconChartLine, IconCoin, + IconReceipt2, IconRefresh, IconLoader2, } from "@tabler/icons-react"; @@ -229,20 +231,34 @@ export function SpendEvents() { {event.maybe_username ? ( - - @{event.maybe_username} - + + + @{event.maybe_username} + + + + + + | + + + + + ) : ( — )} - {event.maybe_display_name && ( - - {event.maybe_display_name} - - )} (() => { + if (chartData.length === 0) return [0, 1]; + const values = chartData.map((d) => d.net); + const dataMax = Math.max(0, ...values); + const dataMin = Math.min(0, ...values); + const max = dataMax === 0 ? 1 : dataMax * 1.1; + const min = dataMin === 0 ? 0 : dataMin * 1.1; + return [min, max]; + }, [chartData]); + if (isLoading) { return ( @@ -309,7 +321,8 @@ export function UserSpendSummary() { axisLine={false} width={56} tickMargin={8} - domain={["auto", "auto"]} + domain={yDomain} + allowDataOverflow tickFormatter={(value) => formatUsdCompact(Number(value) * 100)} />