From 3ceea6b060799e4d2b9dc6f589d9e82366604f2d Mon Sep 17 00:00:00 2001 From: josc146 Date: Mon, 3 Apr 2023 15:56:02 +0800 Subject: [PATCH] chore: redirect to the usage page when balance query fails --- src/popup/Popup.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/popup/Popup.jsx b/src/popup/Popup.jsx index f2bf0dd..605b164 100644 --- a/src/popup/Popup.jsx +++ b/src/popup/Popup.jsx @@ -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 (