fix: only set stripe app data if it requires payment (#11623)

Co-authored-by: alannnc <alannnc@gmail.com>
pull/11618/head^2
Roland 2023-09-30 01:49:52 +07:00 committed by GitHub
parent 41b6377f29
commit e568d70e65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 6 deletions

View File

@ -48,13 +48,15 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
.trim();
useEffect(() => {
if (requirePayment) {
if (!getAppData("currency")) {
setAppData("currency", currencyOptions[0].value);
}
if (!getAppData("paymentOption")) {
setAppData("paymentOption", paymentOptions[0].value);
}
}, []);
}
}, [requirePayment, getAppData, setAppData]);
return (
<AppCard