20 lines
410 B
TypeScript
20 lines
410 B
TypeScript
import { createState } from '@ui/utilities/state/utils/createState';
|
|
|
|
import { User } from '~/generated/graphql';
|
|
|
|
export type CurrentUser = Pick<
|
|
User,
|
|
| 'id'
|
|
| 'email'
|
|
| 'supportUserHash'
|
|
| 'canAccessFullAdminPanel'
|
|
| 'canImpersonate'
|
|
| 'onboardingStatus'
|
|
| 'userVars'
|
|
>;
|
|
|
|
export const currentUserState = createState<CurrentUser | null>({
|
|
key: 'currentUserState',
|
|
defaultValue: null,
|
|
});
|