- {duration.total} minutes + {stepTitles.length > 0 && ( + {currentStep + 1} - {stepTitles[currentStep]} + )} {step.map((renderer, key) => renderer({ key }))} ({ currentCourse, - currentStepIndex, }); export class Header extends React.Component { static propTypes = { currentCourse: PropTypes.shape(), - currentStepIndex: PropTypes.number, }; static defaultProps = { currentCourse: {}, - currentStepIndex: null, }; render() { const { - currentCourse: { - title = '', - stepTitles = [], - }, - currentStepIndex, + currentCourse, } = this.props; + const headerClasses = cx('site-header', { + '-yellow': currentCourse.title, + }); + return ( - - - - - - + + + + + + + + + + {currentCourse.title && {currentCourse.title}} + {currentCourse.time && {currentCourse.time} minutes} + + + + + + + + + + + + + + + + + + + + + + + - - {title} - {stepTitles.length > 0 && ( - {currentStepIndex + 1} - {stepTitles[currentStepIndex]} - )} + + + + + + + - + ); } }