Use Graphql types in FE and complete mappers removal (#348)
Fix Typescript build issues
This commit is contained in:
@ -1,8 +1,16 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
import { User } from '@/users/interfaces/user.interface';
|
||||
import { User, Workspace, WorkspaceMember } from '~/generated/graphql';
|
||||
|
||||
export const currentUserState = atom<User | null>({
|
||||
type CurrentUser = Pick<User, 'id' | 'email' | 'displayName'> & {
|
||||
workspaceMember?:
|
||||
| (Pick<WorkspaceMember, 'id'> & {
|
||||
workspace: Pick<Workspace, 'id' | 'displayName' | 'logo'>;
|
||||
})
|
||||
| null;
|
||||
};
|
||||
|
||||
export const currentUserState = atom<CurrentUser | null>({
|
||||
key: 'currentUserState',
|
||||
default: null,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user