Background
Area: app/[locale]/admin/analytics/revenue/page.jsx — inline mock data.
Backend (exists, mounted): /api/stellar/reports — summary / daily / comparison / export (reportsRoutes.js).
Task: wire the revenue charts/tables to the real reports endpoints.
Rules (for the PR to be payable)
- Branch from
dev; PR must target dev.
- Swap the mock/stub data source for a real call via the existing
axiosInstance / lib/actions pattern; keep the page's existing loading/empty/error states.
- Preserve graceful degradation: if the API errors, fall back to a sensible empty/error state — do not crash the page.
- Scope changes to this admin area only. Do not touch the reserved role/auth logic or unrelated pages.
npm test, npm run lint, npm run typecheck, and npm run build must all pass. Add/adjust tests for the wired data path.
Acceptance criteria
Background
Area:
app/[locale]/admin/analytics/revenue/page.jsx— inline mock data.Backend (exists, mounted):
/api/stellar/reports— summary / daily / comparison / export (reportsRoutes.js).Task: wire the revenue charts/tables to the real reports endpoints.
Rules (for the PR to be payable)
dev; PR must targetdev.axiosInstance/lib/actionspattern; keep the page's existing loading/empty/error states.npm test,npm run lint,npm run typecheck, andnpm run buildmust all pass. Add/adjust tests for the wired data path.Acceptance criteria
dev