* Wip refactoring view * Post merge conflicts * Fix review * Add create view capability * Fix create object missing view * Fix tests
13 lines
402 B
TypeScript
13 lines
402 B
TypeScript
import { useRecoilState, useRecoilValue } from 'recoil';
|
|
|
|
import { isVerifyPendingState } from '@/auth/states/isVerifyPendingState';
|
|
|
|
import { tokenPairState } from '../states/tokenPairState';
|
|
|
|
export const useIsLogged = (): boolean => {
|
|
const [tokenPair] = useRecoilState(tokenPairState);
|
|
const isVerifyPending = useRecoilValue(isVerifyPendingState);
|
|
|
|
return !!tokenPair && !isVerifyPending;
|
|
};
|