Skip to content

Commit

Permalink
#454 Store and retrieve project actions in/from the backend
Browse files Browse the repository at this point in the history
  • Loading branch information
Adriána Kohanová committed Nov 16, 2020
1 parent 53207bc commit db940e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/components/tracking/trackingModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ export const TrackingModal = memo(({ openModal, onModalClose }) => {
const orderedActionList = (actionList && actionList.sort((a, b) => a.timestamp - b.timestamp)) || [];

const loadAllActions = useCallback(() => {
if (openModal === true && actionList && actionList.length <= 0) {
if (openModal === true) {
dispatch(setProjectTruckingActions());
}
}, [dispatch, actionList, openModal]);
}, [dispatch, openModal]);

useEffect(() => {
loadAllActions();
}, [actionList, loadAllActions]);
}, [loadAllActions]);

if (openModal === undefined) {
console.log('undefined openModal');
Expand Down

0 comments on commit db940e5

Please sign in to comment.