Files
Nexior/src/store/common/getters.ts
T
2025-02-01 13:32:16 +08:00

35 lines
622 B
TypeScript

import { IRootState } from './models';
export const authenticated = (state: IRootState): boolean => {
return !!state.token.access;
};
export const user = (state: IRootState): any => {
return state.user;
};
export const token = (state: IRootState): any => {
return state.token;
};
export const setting = (state: IRootState): any => {
return state.setting;
};
export const site = (state: IRootState): any => {
return state.site;
};
export const fingerprint = (state: IRootState): any => {
return state.fingerprint;
};
export default {
authenticated,
user,
token,
site,
fingerprint,
setting
};