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();
|
.trim();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (requirePayment) {
|
||||||
if (!getAppData("currency")) {
|
if (!getAppData("currency")) {
|
||||||
setAppData("currency", currencyOptions[0].value);
|
setAppData("currency", currencyOptions[0].value);
|
||||||
}
|
}
|
||||||
if (!getAppData("paymentOption")) {
|
if (!getAppData("paymentOption")) {
|
||||||
setAppData("paymentOption", paymentOptions[0].value);
|
setAppData("paymentOption", paymentOptions[0].value);
|
||||||
}
|
}
|
||||||
}, []);
|
}
|
||||||
|
}, [requirePayment, getAppData, setAppData]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppCard
|
<AppCard
|
||||||
|
|
Loading…
Reference in New Issue