Fix : Preferences

This commit is contained in:
elforjani3
2020-11-02 10:23:01 +02:00
parent f76abb3f79
commit e36a1dcf50
20 changed files with 853 additions and 549 deletions

View File

@@ -4,12 +4,21 @@ import t from 'store/types';
export const fetchUsers = () => {
return (dispatch) =>
new Promise((resolve, reject) => {
dispatch({
type: t.USERS_TABLE_LOADING,
payload: { loading: true },
});
ApiService.get(`users`)
.then((response) => {
dispatch({
type: t.USERS_LIST_SET,
users: response.data.users,
});
dispatch({
type: t.USERS_TABLE_LOADING,
payload: { loading: false },
});
resolve(response);
})
.catch((error) => {