)
}}
/>
```
4. Destructure `locale = 'en'` from props with default
**AvailableBalance.tsx:**
1. Add `locale?: string` to the `Props` interface
2. Import `Tooltip` from `recharts` (add to existing import)
3. Add `` with identical custom `content` renderer pattern inside the `` after the `` element
4. Update the center text `formatCurrency(available, budget.currency)` call to include locale: `formatCurrency(available, budget.currency, locale)`
5. Destructure `locale = 'en'` from props with default
**Do NOT** use `ChartContainer` or `ChartTooltipContent` from shadcn — these charts use raw Recharts primitives and the project rule forbids editing shadcn ui source files.
**Tooltip styling** must match shadcn design system: `rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl` — this replicates the ChartTooltipContent styling without importing it.
cd /home/jean-luc-makiola/Development/projects/SimpleFinanceDash/frontend && bun vitest runBoth chart components accept an optional locale prop, render custom tooltips with formatCurrency, and AvailableBalance center text passes locale to formatCurrencyTask 2: Thread user locale from useAuth through DashboardPage to chart componentsfrontend/src/pages/DashboardPage.tsx
1. Add `useAuth` import: `import { useAuth } from '@/hooks/useAuth'`
2. Inside `DashboardPage` function body, call: `const { user } = useAuth()`
3. Derive locale with defensive fallback: `const userLocale = user?.preferred_locale || 'en'`
4. Pass `locale={userLocale}` prop to both chart component instances:
- ``
- ``
5. Do NOT pass locale to other components (BillsTracker, VariableExpenses, DebtTracker, FinancialOverview) — those components use formatCurrency with the new 'en' default which is correct. A full locale-threading pass across all table components is out of scope for this phase.
The `useAuth()` hook is idempotent — it reads from the same React state already initialized by `App.tsx`, so there is no double-fetch concern.
cd /home/jean-luc-makiola/Development/projects/SimpleFinanceDash/frontend && bun vitest runDashboardPage calls useAuth(), derives userLocale, and passes it to both ExpenseBreakdown and AvailableBalance as a locale prop
1. `cd frontend && bun vitest run` — full test suite passes
2. `cd frontend && bun run build` — production build succeeds with no TypeScript errors
3. Manual: hover over ExpenseBreakdown pie slices — tooltip shows category name + formatted currency
4. Manual: hover over AvailableBalance donut slices — tooltip shows segment name + formatted currency
5. Manual: AvailableBalance center text formats using user's locale preference
- ExpenseBreakdown shows formatted currency tooltip on hover (not raw numbers)
- AvailableBalance shows formatted currency tooltip on hover (previously had no tooltip)
- AvailableBalance center text uses the user's locale for formatting
- DashboardPage reads user.preferred_locale via useAuth and threads it to both chart components
- Full test suite and build pass with no errors