Resolve https://github.com/twentyhq/twenty/issues/8070 --------- Co-authored-by: Félix Malfait <felix@twenty.com>
25 lines
545 B
TypeScript
25 lines
545 B
TypeScript
import { createState } from 'twenty-ui';
|
|
|
|
import { Workspace } from '~/generated/graphql';
|
|
|
|
export type CurrentWorkspace = Pick<
|
|
Workspace,
|
|
| 'id'
|
|
| 'inviteHash'
|
|
| 'logo'
|
|
| 'displayName'
|
|
| 'allowImpersonation'
|
|
| 'featureFlags'
|
|
| 'activationStatus'
|
|
| 'currentBillingSubscription'
|
|
| 'workspaceMembersCount'
|
|
| 'isPublicInviteLinkEnabled'
|
|
| 'hasValidEntrepriseKey'
|
|
| 'metadataVersion'
|
|
>;
|
|
|
|
export const currentWorkspaceState = createState<CurrentWorkspace | null>({
|
|
key: 'currentWorkspaceState',
|
|
defaultValue: null,
|
|
});
|