diff --git a/apps/dashboard/src/components/charts/bar-chart.tsx b/apps/dashboard/src/components/charts/bar-chart.tsx index 91f2b5750b..cd0dd5480a 100644 --- a/apps/dashboard/src/components/charts/bar-chart.tsx +++ b/apps/dashboard/src/components/charts/bar-chart.tsx @@ -140,14 +140,17 @@ export function BarChart({ data }) { fontSize={12} tickLine={false} axisLine={false} - tickFormatter={(value) => - formatAmount({ - maximumFractionDigits: 0, - minimumFractionDigits: 0, - currency: data.summary.currency, - amount: value, - }) - } + tickFormatter={(value) => { + if (data.summary.currency) { + return formatAmount({ + maximumFractionDigits: 0, + minimumFractionDigits: 0, + currency: data.summary.currency, + amount: value, + }); + } + return 0; + }} tick={{ fill: "#606060", fontSize: 12, diff --git a/apps/dashboard/src/components/charts/transactions-list.tsx b/apps/dashboard/src/components/charts/transactions-list.tsx index 317aa3d49a..bffe4c887f 100644 --- a/apps/dashboard/src/components/charts/transactions-list.tsx +++ b/apps/dashboard/src/components/charts/transactions-list.tsx @@ -47,6 +47,14 @@ export async function TransactionsList({ type, disabled }) { }, }); + if (!data?.length) { + return ( +
+

No transactions found

+
+ ); + } + return (