mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 16:09:42 +01:00
fix: do not load checkout for logged out users
This commit is contained in:
@@ -379,20 +379,24 @@ function BuyDialog(props) {
|
||||
<TryForFree />
|
||||
)}
|
||||
</Flex>
|
||||
{selectedPlan ? (
|
||||
<Checkout
|
||||
user={user}
|
||||
plan={selectedPlan}
|
||||
onCheckoutLoaded={(data) => {
|
||||
const pricingInfo = getPricingInfoFromCheckout(
|
||||
selectedPlan,
|
||||
data
|
||||
);
|
||||
console.log(pricingInfo, selectedPlan.coupon);
|
||||
setDiscount(pricingInfo);
|
||||
}}
|
||||
/>
|
||||
) : plan ? null : (
|
||||
{isLoggedIn ? (
|
||||
selectedPlan ? (
|
||||
<Checkout
|
||||
user={user}
|
||||
plan={selectedPlan}
|
||||
onCheckoutLoaded={(data) => {
|
||||
const pricingInfo = getPricingInfoFromCheckout(
|
||||
selectedPlan,
|
||||
data
|
||||
);
|
||||
console.log(pricingInfo, selectedPlan.coupon);
|
||||
setDiscount(pricingInfo);
|
||||
}}
|
||||
/>
|
||||
) : plan ? null : (
|
||||
<FeaturesList />
|
||||
)
|
||||
) : (
|
||||
<FeaturesList />
|
||||
)}
|
||||
</Flex>
|
||||
|
||||
Reference in New Issue
Block a user