Files
twenty/front/src/modules/auth/hooks/useIsLogged.ts
T
Jérémy M 31145c5518 feat: align auth api with front convention (#370)
* feat: align auth api with front convention

* fix: email password auth

* fix: proper file naming

* Fix login

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2023-06-23 22:43:54 -07:00

10 lines
222 B
TypeScript

import { useRecoilState } from 'recoil';
import { tokenPairState } from '../states/tokenPairState';
export function useIsLogged(): boolean {
const [tokenPair] = useRecoilState(tokenPairState);
return !!tokenPair;
}