refactor vuex
This commit is contained in:
1 parent
9c69e96416
commit
565b367c59
20 files changed
+264
-178
No files matched your search
@@ -0,0 +1,29 @@
|
||||
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 applications = (state: IRootState): any => {
|
||||
return state.applications;
|
||||
};
|
||||
|
||||
export default {
|
||||
authenticated,
|
||||
user,
|
||||
token,
|
||||
setting,
|
||||
applications
|
||||
};
|
||||
Reference in new issue
Block a user