Lucas/t 369 on comment drawer i can reply to a comment thread and it (#206)
* Added prisma to suggested extension in container * Added comments and authors on drawer with proper resolving * Fix lint * Fix console log * Fixed generated front graphql from rebase * Fixed right drawer width and shared in theme * Added date packages and tooltip * Added date utils and tests * Added comment thread components * Fixed comment chip * wip * wip 2 * - Added string typing for DateTime scalar - Refactored user in a recoil state and workspace using it - Added comment creation * Prepared EditableCell refactor * Fixed line height and tooltip * Fix lint
This commit is contained in:
8
front/src/modules/auth/states/currentUserState.ts
Normal file
8
front/src/modules/auth/states/currentUserState.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
import { User } from '@/users/interfaces/user.interface';
|
||||
|
||||
export const currentUserState = atom<User | null>({
|
||||
key: 'auth/current-user',
|
||||
default: null,
|
||||
});
|
||||
11
front/src/modules/auth/states/isAuthenticatedState.ts
Normal file
11
front/src/modules/auth/states/isAuthenticatedState.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { selector } from 'recoil';
|
||||
|
||||
import { currentUserState } from './currentUserState';
|
||||
|
||||
export const isAuthenticatedState = selector<boolean>({
|
||||
key: 'auth/is-authenticated',
|
||||
get: ({ get }) => {
|
||||
const user = get(currentUserState);
|
||||
return !!user;
|
||||
},
|
||||
});
|
||||
6
front/src/modules/auth/states/isAuthenticatingState.ts
Normal file
6
front/src/modules/auth/states/isAuthenticatingState.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import { atom } from 'recoil';
|
||||
|
||||
export const isAuthenticatingState = atom<boolean>({
|
||||
key: 'auth/is-authenticating',
|
||||
default: true,
|
||||
});
|
||||
Reference in New Issue
Block a user