Keep button loading when redirecting
This commit is contained in:
1 parent
5ec61cc32f
commit
de237ec6fc
1 file changed
+2
@@ -56,6 +56,7 @@ export function BuyButton(props: BuyButtonProps) {
|
||||
const {
|
||||
mutate: createCheckoutSession,
|
||||
isPending: isCreatingCheckoutSession,
|
||||
isSuccess: isCheckoutSessionCreated,
|
||||
} = useMutation(
|
||||
{
|
||||
mutationFn: (body: CreateCheckoutSessionBody) => {
|
||||
@@ -147,6 +148,7 @@ export function BuyButton(props: BuyButtonProps) {
|
||||
|
||||
const isLoadingPricing =
|
||||
isFakeLoading ||
|
||||
isCheckoutSessionCreated ||
|
||||
isLoadingPrice ||
|
||||
!coursePricing ||
|
||||
isLoadingCourseProgress ||
|
||||
|
||||
Reference in new issue
Block a user