// eslint-disable-next-line no-unused-vars function CurriculumMapUnit(props) { const curriculum = props.curriculum; const isActive = _.includes(props.active, curriculum.id) || props.isActiveBranch; const isAssessment = curriculum.resource.is_assessment; const cssClasses = classNames( 'o-c-map__unit-title', { [`${props.mapType}-txt-link--base`]: !isActive, [`${props.mapType}-txt-link--${props.colorCode} ${props.mapType}-txt-link--active`]: isActive }); let lessons; let isActiveBranch = _.first(props.active) === curriculum.id || props.isActiveBranch; if (isAssessment) { lessons = [ ]; } else { lessons = _.filter(curriculum.children, x => !x.resource.is_opr); lessons = lessons.map( lesson => ); } let resourceHtml; if (isAssessment) { resourceHtml = /mid/.test(curriculum.resource.short_title) ? 'MID' : 'END'; } else { resourceHtml = curriculum.resource.short_title; } return (
{lessons}
); }