diff --git a/resources/js/components/dashboard/top-categories-card.tsx b/resources/js/components/dashboard/top-categories-card.tsx index e94a3f3b..0176f2b4 100644 --- a/resources/js/components/dashboard/top-categories-card.tsx +++ b/resources/js/components/dashboard/top-categories-card.tsx @@ -9,6 +9,7 @@ import { import { Progress } from '@/components/ui/progress'; import { cn } from '@/lib/utils'; import { Category, getCategoryColorClasses } from '@/types/category'; +import { usePage } from '@inertiajs/react'; import * as Icons from 'lucide-react'; import { LucideIcon } from 'lucide-react'; import { PercentageTrendIndicator } from './percentage-trend-indicator'; @@ -42,6 +43,8 @@ export function TopCategoriesCard({ categories, loading, }: TopCategoriesCardProps) { + const { auth } = usePage<{ auth: { user: { currency_code: string } } }>(); + if (loading) { return ( @@ -117,14 +120,16 @@ export function TopCategoriesCard({ item.previous_amount } currentAmount={item.amount} - currencyCode="USD" + currencyCode={ + auth.user.currency_code + } invertColors className="shrink-0 text-xs" /> )}