import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import Hardware from './Hardware'; import Requirement from './Requirement'; import BlocklyWindow from '../Blockly/BlocklyWindow'; import Grid from '@material-ui/core/Grid'; import Typography from '@material-ui/core/Typography'; class Instruction extends Component { render() { var step = this.props.step; var isHardware = step.hardware && step.hardware.length > 0; var areRequirements = step.requirements && step.requirements.length > 0; return (
{step.headline} {step.text} {isHardware ? : null} {areRequirements > 0 ? : null} {step.xml ? : null }
); }; } Instruction.propTypes = { currentTutorialId: PropTypes.number, }; const mapStateToProps = state => ({ currentTutorialId: state.tutorial.currentId }); export default connect(mapStateToProps, null)(Instruction);