Split from https://github.com/twentyhq/twenty/pull/4518 Co-authored-by: Charles Bochet <charlesBochet@users.noreply.github.com>
14 lines
306 B
TypeScript
14 lines
306 B
TypeScript
import { createState } from 'twenty-ui';
|
|
|
|
import { User } from '~/generated/graphql';
|
|
|
|
export type CurrentUser = Pick<
|
|
User,
|
|
'id' | 'email' | 'supportUserHash' | 'canImpersonate'
|
|
>;
|
|
|
|
export const currentUserState = createState<CurrentUser | null>({
|
|
key: 'currentUserState',
|
|
defaultValue: null,
|
|
});
|