Description: Currently, if data fails to load (e.g., API is down, network error), the app either shows mock data silently or shows a generic toast. Each data-dependent section should have a dedicated error state with a "Retry" button and a helpful message.
Requirements:
- Create an
ErrorDisplay component with: error icon, message, and "Try Again" button
- Add error state handling to: dashboard stat cards, transactions table, payment links list, wallet balances, settlement history, FX rates
- Use React Query's
isError state if applicable, or manual error state management
- The retry button should re-trigger the data fetch
- Show a subtle message, not a full-page takeover
Suggested execution steps:
- Create
components/shared/ErrorDisplay.tsx with message, onRetry props
- In the wallet page, add error state: if
refreshBalances fails, show ErrorDisplay in place of balances
- In the transactions page, add error state: show ErrorDisplay in the table body
- In the dashboard, add error boundary around each section
- Use consistent amber/slate styling for the error display
Example commit message:
feat(ux): add error states with retry buttons to all data-dependent sections
Created ErrorDisplay component with icon, message, and "Try Again" button.
Added error handling to wallet balances, transactions table, payment links,
settlement history, and FX rates. Sections now gracefully degrade instead
of failing silently or showing stale mock data.
Description: Currently, if data fails to load (e.g., API is down, network error), the app either shows mock data silently or shows a generic toast. Each data-dependent section should have a dedicated error state with a "Retry" button and a helpful message.
Requirements:
ErrorDisplaycomponent with: error icon, message, and "Try Again" buttonisErrorstate if applicable, or manual error state managementSuggested execution steps:
components/shared/ErrorDisplay.tsxwithmessage,onRetrypropsrefreshBalancesfails, show ErrorDisplay in place of balancesExample commit message: