Skip to content

Commit

Permalink
fix(admin-ui): bug fix for loading
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Jun 7, 2022
1 parent c0bef04 commit 5f72957
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ import {

function UserList(props) {
const dispatch = useDispatch()

let opt = {}
useEffect(() => {
opt['limit'] = 0
dispatch(getUsers({}))
dispatch(getAttributes({}))
dispatch(getAttributes(opt))
}, [])

const usersList = useSelector((state) => state.userReducer.items)
Expand All @@ -49,6 +50,10 @@ function UserList(props) {
const pageSize = localStorage.getItem('paggingSize') || 10
const history = useHistory()

useEffect(() => {
console.log('Loading', loading)
}, [loading])

function handleGoToUserAddPage() {
dispatch(setSelectedUserData(null))
return history.push('/user/usermanagement/add')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import reducerRegistry from '../../../../app/redux/reducers/ReducerRegistry'
const INIT_STATE = {
items: [],
selectedUserData: null,
loading: false,
loading: true,
redirectToUserListPage: false,
}
const reducerName = 'userReducer'
Expand Down Expand Up @@ -68,7 +68,6 @@ export default function userReducer(state = INIT_STATE, action) {
function handleDefault() {
return {
...state,
loading: false,
}
}
}
Expand Down

0 comments on commit 5f72957

Please sign in to comment.