Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Commit

Permalink
fix: only set stripe app data if it requires payment (calcom#11623)
Browse files Browse the repository at this point in the history
Co-authored-by: alannnc <[email protected]>
  • Loading branch information
rolznz and alannnc authored Sep 29, 2023
1 parent 41b6377 commit e568d70
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e568d70

Please sign in to comment.