Merge branch 'main' of https://gitea.bowongai.com/bowong/expo-duooomi-app
This commit is contained in:
commit
93122d9955
|
|
@ -7,12 +7,10 @@ export const useUserBalance = () => {
|
|||
const [error, setError] = useState<ApiError | null>(null)
|
||||
const [balance, setBalance] = useState<number>(0)
|
||||
|
||||
const load = async (userId?: string) => {
|
||||
const load = async () => {
|
||||
try {
|
||||
setLoading(true)
|
||||
const { data, error } = await subscription.list(
|
||||
userId ? { query: { referenceId: userId } } : undefined
|
||||
)
|
||||
const { data, error } = await subscription.list()
|
||||
|
||||
if (error) {
|
||||
setError(error)
|
||||
|
|
|
|||
Loading…
Reference in New Issue