Skip to content

Commit

Permalink
chore: redirect to the usage page when balance query fails
Browse files Browse the repository at this point in the history
  • Loading branch information
josStorer committed Apr 3, 2023
1 parent 42a68f4 commit 7e5e00c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/popup/Popup.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 7e5e00c

Please sign in to comment.