Fix stories

This commit is contained in:
Charles Bochet
2025-04-15 23:19:15 +02:00
parent 53c6ddb2ad
commit 981b1bd767
6 changed files with 57 additions and 43 deletions

View File

@ -1,4 +1,4 @@
import { PLAYGROUND_SETUP_SELECT_OPTIONS } from '@/settings/playground/constants/PlaygroundSetupSelectOptions';
import { SETTINGS_PLAYGROUND_FORM_SCHEMA_SELECT_OPTIONS } from '@/settings/playground/constants/SettingsPlaygroundFormSchemaSelectOptions';
import { playgroundApiKeyState } from '@/settings/playground/states/playgroundApiKeyState';
import { PlaygroundSchemas } from '@/settings/playground/types/PlaygroundSchemas';
import { PlaygroundTypes } from '@/settings/playground/types/PlaygroundTypes';
@ -133,10 +133,12 @@ export const PlaygroundSetupForm = () => {
<Select
dropdownId="schema"
label={t`Schema`}
options={PLAYGROUND_SETUP_SELECT_OPTIONS.map((option) => ({
...option,
label: t(option.label),
}))}
options={SETTINGS_PLAYGROUND_FORM_SCHEMA_SELECT_OPTIONS.map(
(option) => ({
...option,
label: t(option.label),
}),
)}
value={value}
onChange={onChange}
/>

View File

@ -1,16 +0,0 @@
import { PlaygroundTypes } from '@/settings/playground/types/PlaygroundTypes';
import { msg } from '@lingui/core/macro';
import { IconApi, IconBrandGraphql } from 'twenty-ui/display';
export const PLAYGROUND_SETUP_SELECT_OPTIONS = [
{
value: PlaygroundTypes.REST,
label: msg`REST`,
Icon: IconApi,
},
{
value: PlaygroundTypes.GRAPHQL,
label: msg`GraphQL`,
Icon: IconBrandGraphql,
},
];

View File

@ -0,0 +1,15 @@
import { PlaygroundSchemas } from '@/settings/playground/types/PlaygroundSchemas';
import { msg } from '@lingui/core/macro';
import { IconBracketsAngle, IconFolderRoot } from 'twenty-ui/display';
export const SETTINGS_PLAYGROUND_FORM_SCHEMA_SELECT_OPTIONS = [
{
value: PlaygroundSchemas.CORE,
label: msg`Core`,
Icon: IconFolderRoot,
},
{
value: PlaygroundSchemas.METADATA,
label: msg`Metadata`,
Icon: IconBracketsAngle,
},
];