Add Mollie checkout flow, billing UI, and payment UX polish #71
@@ -136,12 +136,13 @@ function CheckoutContent() {
|
|||||||
}
|
}
|
||||||
}, [authLoading, user, router])
|
}, [authLoading, user, router])
|
||||||
|
|
||||||
// -- Subscription guard --
|
// -- Subscription guard (skip on success page — it handles its own redirect) --
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (status === 'success') return
|
||||||
if (subscription && (subscription.subscription_status === 'active' || subscription.subscription_status === 'trialing')) {
|
if (subscription && (subscription.subscription_status === 'active' || subscription.subscription_status === 'trialing')) {
|
||||||
router.replace('/')
|
router.replace('/')
|
||||||
}
|
}
|
||||||
}, [subscription, router])
|
}, [subscription, status, router])
|
||||||
|
|
||||||
// -- Param validation --
|
// -- Param validation --
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ function LayoutInner({ children }: { children: React.ReactNode }) {
|
|||||||
return <LoadingOverlay logoSrc="/pulse_icon_no_margins.png" title="Pulse" portal={false} />
|
return <LoadingOverlay logoSrc="/pulse_icon_no_margins.png" title="Pulse" portal={false} />
|
||||||
}
|
}
|
||||||
|
|
||||||
// While auth is loading on a site page, render nothing to prevent flash of public header
|
// While auth is loading on a site or checkout page, render nothing to prevent flash of public header
|
||||||
if (auth.loading && isSitePage) {
|
if (auth.loading && (isSitePage || isCheckoutPage)) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user