From 844cd32ae6f5a41097943d99be5636681240b05f Mon Sep 17 00:00:00 2001 From: Paul Kaplan <pkaplan@media.mit.edu> Date: Thu, 1 Nov 2018 09:55:20 -0400 Subject: [PATCH] Move timestamp generator into action creator --- src/containers/target-pane.jsx | 4 ++-- src/reducers/targets.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/containers/target-pane.jsx b/src/containers/target-pane.jsx index a95c19809..6ee53ac19 100644 --- a/src/containers/target-pane.jsx +++ b/src/containers/target-pane.jsx @@ -271,8 +271,8 @@ const mapDispatchToProps = dispatch => ({ dispatchUpdateRestore: restoreState => { dispatch(setRestore(restoreState)); }, - onHighlightTarget: (id, time) => { - dispatch(highlightTarget(id, time)); + onHighlightTarget: id => { + dispatch(highlightTarget(id)); } }); diff --git a/src/reducers/targets.js b/src/reducers/targets.js index 58805bce6..17a73f7d8 100644 --- a/src/reducers/targets.js +++ b/src/reducers/targets.js @@ -45,11 +45,11 @@ const updateTargets = function (targetList, editingTarget) { } }; }; -const highlightTarget = function (targetId, updateTime) { +const highlightTarget = function (targetId) { return { type: HIGHLIGHT_TARGET, targetId: targetId, - updateTime: updateTime + updateTime: Date.now() }; }; export { -- GitLab