fix: type error

This commit is contained in:
Nathnael
2026-06-16 13:16:42 +00:00
parent 9afa23cc47
commit edc63379bc

View File

@@ -27,7 +27,7 @@ import { Link, useNavigate } from "react-router-dom";
import useAuth from "@/hooks/useAuth";
import { getMyInvoices } from "@/lib/currentCustomer";
import type { InvoiceStatus } from "@/pages/billing/invoices.mock";
import type { Currency, InvoiceStatus } from "@/pages/billing/invoices.mock";
import { formatCurrency } from "@/pages/billing/invoices.mock";
import { api } from "@/services/api";
@@ -505,7 +505,10 @@ export default function MyPortalPage() {
label="Spend YTD"
value={
dashboard
? formatCurrency(dashboard.spendYtd, dashboard.spendCurrency)
? formatCurrency(
dashboard.spendYtd,
dashboard.spendCurrency as Currency,
)
: "—"
}
delta={
@@ -696,7 +699,7 @@ export default function MyPortalPage() {
<Text fz={13} c="edr-muted">
{formatCurrency(
dashboard?.freightVolume.totalValue ?? 0,
dashboard?.freightVolume.currency ?? "ETB",
(dashboard?.freightVolume.currency ?? "ETB") as Currency,
)}
</Text>
<Text fz={12} fw={700} c="edr-green.7">