import React, { Component } from 'react'; import { connect } from 'react-redux'; import PropTypes from 'prop-types'; import { Trans } from 'react-i18next'; import * as actionCreators from '../../actions/install'; import { INSTALL_FIRST_STEP, INSTALL_TOTAL_STEPS } from '../../helpers/constants'; class Controls extends Component { nextStep = () => { if (this.props.step < INSTALL_TOTAL_STEPS) { this.props.nextStep(); } } prevStep = () => { if (this.props.step > INSTALL_FIRST_STEP) { this.props.prevStep(); } } renderPrevButton(step) { switch (step) { case 2: case 3: case 4: return ( ); default: return false; } } renderNextButton(step) { switch (step) { case 1: return ( ); case 2: case 3: return ( ); case 4: return ( ); case 5: return ( ); default: return false; } } render() { return (