fix: maintain loading guard during async billing URL fetch

Add await to openAsync call to prevent multiple concurrent requests
when users rapidly click the billing button. This maintains the
loading state until the billing URL is successfully fetched and opened.

Addresses review feedback about regression in loading behavior
This commit is contained in:
yyh 2025-12-10 12:23:56 +08:00
parent bac0513b8b
commit 8bf9eee91e
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ const CloudPlanItem: FC<CloudPlanItemProps> = ({
setLoading(true)
try {
if (isCurrentPaidPlan) {
openAsync(
await openAsync(
() => fetchBillingUrl().then(res => res.url),
{
errorMessage: 'Failed to open billing page',