Fix Client Config async loading (#12308)
Fix ClientConfig async loading --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
This commit is contained in:
@ -124,6 +124,9 @@ export const graphqlMocks = {
|
||||
},
|
||||
});
|
||||
}),
|
||||
http.get(`${REACT_APP_SERVER_BASE_URL}/client-config`, () => {
|
||||
return HttpResponse.json(mockedClientConfig);
|
||||
}),
|
||||
metadataGraphql.query(
|
||||
getOperationName(FIND_MANY_OBJECT_METADATA_ITEMS) ?? '',
|
||||
() => {
|
||||
|
||||
@ -10,7 +10,6 @@ export const mockedClientConfig: ClientConfig = {
|
||||
password: true,
|
||||
microsoft: false,
|
||||
sso: [],
|
||||
__typename: 'AuthProviders',
|
||||
},
|
||||
frontDomain: 'localhost',
|
||||
defaultSubdomain: 'app',
|
||||
@ -20,35 +19,29 @@ export const mockedClientConfig: ClientConfig = {
|
||||
support: {
|
||||
supportDriver: 'front',
|
||||
supportFrontChatId: null,
|
||||
__typename: 'Support',
|
||||
},
|
||||
sentry: {
|
||||
dsn: 'MOCKED_DSN',
|
||||
release: 'MOCKED_RELEASE',
|
||||
environment: 'MOCKED_ENVIRONMENT',
|
||||
__typename: 'Sentry',
|
||||
},
|
||||
billing: {
|
||||
isBillingEnabled: true,
|
||||
billingUrl: '',
|
||||
trialPeriods: [
|
||||
{
|
||||
__typename: 'BillingTrialPeriodDTO',
|
||||
duration: 30,
|
||||
isCreditCardRequired: true,
|
||||
},
|
||||
{
|
||||
__typename: 'BillingTrialPeriodDTO',
|
||||
duration: 7,
|
||||
isCreditCardRequired: false,
|
||||
},
|
||||
],
|
||||
__typename: 'Billing',
|
||||
},
|
||||
captcha: {
|
||||
provider: CaptchaDriverType.GoogleRecaptcha,
|
||||
siteKey: 'MOCKED_SITE_KEY',
|
||||
__typename: 'Captcha',
|
||||
},
|
||||
api: { mutationMaximumAffectedRecords: 100 },
|
||||
canManageFeatureFlags: true,
|
||||
|
||||
Reference in New Issue
Block a user