{this.getPromo()}
{promos.map((_, index) => {
return (
);
})}
);
}
private navigateToPromo = (idx: number) => () => {
// stop rotating when user begins interacting with promos
clearInterval(this.timer);
this.setState({ activePromo: Math.max(0, Math.min(promos.length, idx)) });
};
private rotate = () => {
const activePromo = (this.state.activePromo + 1) % promos.length;
this.setState({ activePromo });
};
}
function mapStateToProps(state: AppState): StateProps {
return {
wallet: state.wallet.inst
};
}
export default connect(mapStateToProps, {})(PromosClass);