Updated CreditsPage with full pricing and transaction support:
- Load pricing packages from /api/packages (role-specific)
- Create payment orders via /api/payments/create-order
- Display transaction history from wallet ledger + payments
- New tabbed interface: Overview, Buy Credits, Transactions
- Shows package details: name, price, tracecoins amount
- Format currency in INR with proper locale
Data sources:
- Packages: GET /api/packages?role={role_key}
- Wallet: GET /api/{prefix}/wallet/me
- Ledger: GET /api/{prefix}/wallet/me/ledger
- Payments: POST /api/payments/create-order
|
||
|---|---|---|
| .. | ||
| components | ||
| data | ||
| lib | ||
| routes | ||
| stories | ||
| test | ||
| app.css | ||
| app.tsx | ||
| entry-client.tsx | ||
| entry-server.tsx | ||
| global.d.ts | ||