Attempt at #12289 (edit Félix: removed fix keyword since I don't think it fixes it) --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com> Co-authored-by: Félix Malfait <felix@twenty.com>
8 lines
259 B
TypeScript
8 lines
259 B
TypeScript
import { getTokenPair } from '@/apollo/utils/getTokenPair';
|
|
import { isDefined } from 'twenty-shared/utils';
|
|
|
|
export const hasTokenPair = () => {
|
|
const tokenPair = getTokenPair();
|
|
return isDefined(tokenPair) && isDefined(tokenPair.accessToken?.token);
|
|
};
|