Add Mollie checkout flow, billing UI, and payment UX polish #71

Merged
uz1mani merged 73 commits from staging into main 2026-03-28 10:28:03 +00:00
14 changed files with 925 additions and 102 deletions
Showing only changes of commit fba1f84ce5 - Show all commits

View File

@@ -78,11 +78,17 @@ function LayoutInner({ children }: { children: React.ReactNode }) {
const handleSwitchOrganization = async (orgId: string | null) => {
if (!orgId) return
try {
setIsSwitchingOrg(true)
const { access_token } = await switchContext(orgId)
await setSessionAction(access_token)
sessionStorage.setItem(ORG_SWITCH_KEY, 'true')
window.location.reload()
router.refresh()
// Allow time for server components to re-fetch with new auth
setTimeout(() => {
setIsSwitchingOrg(false)
router.push('/')
}, 600)
} catch (err) {
setIsSwitchingOrg(false)
logger.error('Failed to switch organization', err)
}
}