From 7355f0668f929b13f3a49117a2231c81db053f9a Mon Sep 17 00:00:00 2001 From: Mashy Date: Mon, 28 Oct 2019 15:05:30 +1000 Subject: [PATCH] targetting arrows shouldUpdate --- client/src/components/targeting.arrows.jsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/client/src/components/targeting.arrows.jsx b/client/src/components/targeting.arrows.jsx index 48dcaf3c..a79de304 100644 --- a/client/src/components/targeting.arrows.jsx +++ b/client/src/components/targeting.arrows.jsx @@ -27,6 +27,16 @@ class TargetSvg extends Component { }, 500); } + shouldComponentUpdate(newProps) { + if (newProps.game !== this.props.game) return true; + if (newProps.account !== this.props.account) return true; + if (newProps.animating !== this.props.animating) return true; + if (newProps.animSkill !== this.props.animSkill) return true; + if (newProps.gameEffectInfo !== this.props.gameEffectInfo) return true; + if (newProps.tutorialGame !== this.props.tutorialGame) return true; + return false; + } + render(props, state) { const { game, account, animating, animSkill, itemInfo, gameEffectInfo, tutorialGame } = props; const { width, height } = state;