import React from 'react'; import { translate } from '../../translate/translate'; import { dashboardChangeActiveCoin, iguanaActiveHandle, getAddressesByAccount, getSyncInfo, startInterval, stopInterval, iguanaEdexBalance } from '../../actions/actionCreators'; import Store from '../../store'; class CoinTileItem extends React.Component { constructor(props) { super(props); this.state = { }; } dashboardChangeActiveCoin(coin, mode) { if (mode === 'full' && coin !== this.props.ActiveCoin.coin) { Store.dispatch(stopInterval('sync', this.props.Interval.interval)); var _iguanaActiveHandle = setInterval(function() { Store.dispatch(getSyncInfo(coin)); }, 3000); Store.dispatch(startInterval('sync', _iguanaActiveHandle)); } else { Store.dispatch(stopInterval('sync', this.props.Interval.interval)); } Store.dispatch(dashboardChangeActiveCoin(coin, mode)); Store.dispatch(iguanaActiveHandle(true)); Store.dispatch(getAddressesByAccount(coin)); Store.dispatch(iguanaEdexBalance(coin)); /*this.setState(Object.assign({}, this.state, { activeHandleInterval: _iguanaActiveHandle, }));*/ } render() { const { item } = this.props; return (