mirror of https://github.com/langgenius/dify.git
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:
parent
bac0513b8b
commit
8bf9eee91e
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in New Issue