useCredits
useCredits(
options:object):UseCreditsResult
Defined in: src/react/useCredits.ts:85
React hook for managing credits: checking balance, claiming daily credits, browsing packs, and purchasing credits.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
‐ |
|
|
|
Whether to fetch credit balance automatically on mount (default: true) |
|
|
|
Optional base URL for the API requests. |
|
|
() => |
Custom function to get auth token for API calls |
|
|
( |
Optional callback for error handling |
Returns
Last updated on