chore: redirect to the usage page when balance query fails

This commit is contained in:
josc146 committed 2023-04-03 15:56:02 +08:00
1 parent 81d15b8093
commit 3ceea6b060
1 file changed
+1
+1
View File
@@ -39,6 +39,7 @@ function GeneralPart({ config, updateConfig }) {
},
})
if (response.ok) setBalance((await response.json()).total_available.toFixed(2))
else openUrl('https://platform.openai.com/account/usage')
}
return (