From 420b3b71e94be30a1b56e5cdecd0f71bb66bf433 Mon Sep 17 00:00:00 2001 From: ntr Date: Tue, 23 Jul 2019 17:08:12 +1000 Subject: [PATCH] actually fix cb --- client/src/components/anims/attack.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/components/anims/attack.jsx b/client/src/components/anims/attack.jsx index 29fc3599..6e580daf 100644 --- a/client/src/components/anims/attack.jsx +++ b/client/src/components/anims/attack.jsx @@ -1,9 +1,17 @@ const preact = require('preact'); const { Component } = require('preact'); +const { connect } = require('preact-redux'); const anime = require('animejs').default; const { TIMES, COLOURS } = require('../../constants'); +const addState = connect( + function receiveState(state) { + const { animCb } = state; + return { animCb }; + } +); + class Attack extends Component { constructor(props) { super(); @@ -56,4 +64,4 @@ class Attack extends Component { } -module.exports = Attack; +module.exports = addState(Attack);