|
|
@ -56,6 +56,7 @@ export function BuyButton(props: BuyButtonProps) { |
|
|
|
const { |
|
|
|
const { |
|
|
|
mutate: createCheckoutSession, |
|
|
|
mutate: createCheckoutSession, |
|
|
|
isPending: isCreatingCheckoutSession, |
|
|
|
isPending: isCreatingCheckoutSession, |
|
|
|
|
|
|
|
isSuccess: isCheckoutSessionCreated, |
|
|
|
} = useMutation( |
|
|
|
} = useMutation( |
|
|
|
{ |
|
|
|
{ |
|
|
|
mutationFn: (body: CreateCheckoutSessionBody) => { |
|
|
|
mutationFn: (body: CreateCheckoutSessionBody) => { |
|
|
@ -147,6 +148,7 @@ export function BuyButton(props: BuyButtonProps) { |
|
|
|
|
|
|
|
|
|
|
|
const isLoadingPricing = |
|
|
|
const isLoadingPricing = |
|
|
|
isFakeLoading || |
|
|
|
isFakeLoading || |
|
|
|
|
|
|
|
isCheckoutSessionCreated || |
|
|
|
isLoadingPrice || |
|
|
|
isLoadingPrice || |
|
|
|
!coursePricing || |
|
|
|
!coursePricing || |
|
|
|
isLoadingCourseProgress || |
|
|
|
isLoadingCourseProgress || |
|
|
|