This repository has been archived on 2022-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
Lateinicus/src/actions/index.ts

49 lines
1.0 KiB
TypeScript
Raw Normal View History

2018-09-18 16:06:08 +00:00
export const SET_DRAWER = "SET_DRAWER";
export function setDrawer(state: boolean) {
return {
type: SET_DRAWER,
show: state,
};
};
export const SET_DRAWER_BUTTON = "SET_DRAWER_BUTTON";
export function setDrawerButton(state: boolean) {
return {
type: SET_DRAWER_BUTTON,
show: state,
};
};
2018-09-18 16:59:15 +00:00
export const LOGIN_SET_SNACKBAR = "LOGIN_SET_SNACKBAR";
export function setLoginSnackbar(visibility: boolean, msg: string = "") {
return {
type: LOGIN_SET_SNACKBAR,
show: visibility,
msg,
};
};
export const LOGIN_SET_LOADING = "LOGIN_SET_LOADING";
export function setLoginLoading(visibility: boolean) {
return {
type: LOGIN_SET_LOADING,
show: visibility,
};
};
export const SET_AUTHENTICATED = "SET_AUTHENTICATED";
export function setAuthenticated(state: boolean) {
return {
type: SET_AUTHENTICATED,
status: state,
};
}
export const SET_USER = "SET_USER";
export function setUser(user: IUser) {
return {
type: SET_USER,
user,
};
}