fix: only set stripe app data if it requires payment (#11623)
Co-authored-by: alannnc <alannnc@gmail.com>pull/11618/head^2
parent
41b6377f29
commit
e568d70e65
|
@ -48,13 +48,15 @@ const EventTypeAppCard: EventTypeAppCardComponent = function EventTypeAppCard({
|
|||
.trim();
|
||||
|
||||
useEffect(() => {
|
||||
if (!getAppData("currency")) {
|
||||
setAppData("currency", currencyOptions[0].value);
|
||||
if (requirePayment) {
|
||||
if (!getAppData("currency")) {
|
||||
setAppData("currency", currencyOptions[0].value);
|
||||
}
|
||||
if (!getAppData("paymentOption")) {
|
||||
setAppData("paymentOption", paymentOptions[0].value);
|
||||
}
|
||||
}
|
||||
if (!getAppData("paymentOption")) {
|
||||
setAppData("paymentOption", paymentOptions[0].value);
|
||||
}
|
||||
}, []);
|
||||
}, [requirePayment, getAppData, setAppData]);
|
||||
|
||||
return (
|
||||
<AppCard
|
||||
|
|
Loading…
Reference in New Issue