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 [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)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue