This commit is contained in:
康猛 2025-12-26 13:36:59 +08:00
commit 93122d9955
1 changed files with 2 additions and 4 deletions

View File

@ -7,12 +7,10 @@ export const useUserBalance = () => {
const [error, setError] = useState<ApiError | null>(null) const [error, setError] = useState<ApiError | null>(null)
const [balance, setBalance] = useState<number>(0) const [balance, setBalance] = useState<number>(0)
const load = async (userId?: string) => { const load = async () => {
try { try {
setLoading(true) setLoading(true)
const { data, error } = await subscription.list( const { data, error } = await subscription.list()
userId ? { query: { referenceId: userId } } : undefined
)
if (error) { if (error) {
setError(error) setError(error)