fix billingCheckoutSession query param + enable redirect on workspace… (#11509)

… during onboarding



fixes : https://github.com/twentyhq/core-team-issues/issues/668
This commit is contained in:
Etienne
2025-04-10 16:47:40 +02:00
committed by GitHub
parent d69932c6c4
commit ee5aa2393d
20 changed files with 151 additions and 92 deletions

View File

@ -0,0 +1,26 @@
import { urlSyncEffect } from 'recoil-sync';
import { createState } from 'twenty-ui/utilities';
export const animateModalState = createState<boolean>({
key: 'animateModalState',
defaultValue: true,
effects: [
urlSyncEffect({
itemKey: 'animateModal',
refine: (value: unknown) => {
if (typeof value === 'boolean') {
return {
type: 'success',
value: value as boolean,
warnings: [],
} as const;
}
return {
type: 'failure',
message: 'Invalid animateModalState',
path: [] as any,
} as const;
},
}),
],
});

View File

@ -8,6 +8,7 @@ export const billingCheckoutSessionState = createState<BillingCheckoutSession>({
defaultValue: BILLING_CHECKOUT_SESSION_DEFAULT_VALUE,
effects: [
syncEffect({
itemKey: 'billingCheckoutSession',
refine: (value: unknown) => {
if (
typeof value === 'object' &&