whisper-money/resources/js/components/onboarding
Víctor Falcón 186ae57c2d
refactor(accounts): unify account type icons via accountIconByType helper (#180)
## Why

### Problem
Account type icons were defined in two separate places —
`step-account-types.tsx` (onboarding) and `account-type-icon.tsx`
(dashboard) — using different icon choices for the same account types.
For example, `checking` showed `Building2` on the dashboard but `Wallet`
in onboarding, and `retirement` showed `Umbrella` vs `TrendingUp`. This
created a visually inconsistent experience.

## What

### Changes
- Added `accountIconByType(type: AccountType): LucideIcon` helper to
`resources/js/types/account.ts` as the single source of truth for
account type icons
- Updated `AccountTypeIcon` component to delegate to the new helper
instead of maintaining its own map
- Updated `StepAccountTypes` to derive icons from the helper instead of
storing them inline per entry
- Dashboard account cards now use the same icon set as the onboarding
screen (Wallet, PiggyBank, CreditCard, LineChart, TrendingUp, Building2)

## Verification

### Tests
No behaviour change — purely a refactor consolidating icon mapping into
one place. Existing tests remain unaffected.
2026-03-02 08:47:44 +00:00
..
step-account-types.tsx refactor(accounts): unify account type icons via accountIconByType helper (#180) 2026-03-02 08:47:44 +00:00
step-button.tsx User Onboarding Flow (#23) 2025-12-12 13:06:08 +01:00
step-category-types.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
step-complete.tsx feat(i18n): localize Spanish translations and currency formatting (#160) 2026-02-28 18:46:18 +00:00
step-create-account.tsx feat(i18n): localize Spanish translations and currency formatting (#160) 2026-02-28 18:46:18 +00:00
step-customize-categories.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
step-header.tsx User Onboarding Flow (#23) 2025-12-12 13:06:08 +01:00
step-import-balances.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00
step-import-transactions.tsx fix: Onboarding, account not shown on the import drawer (#121) 2026-02-13 11:09:55 +01:00
step-more-accounts.tsx feat: Decrypt encrypted transactions on key unlock (#123) 2026-02-16 10:37:43 +01:00
step-smart-rules.tsx Replace E2E encryption mentions with privacy-first messaging (#124) 2026-02-14 16:59:50 +01:00
step-welcome.tsx feat: Spanish localization (#74) 2026-02-08 11:58:08 +01:00