Merge pull request #135 from Bouncey/fix/introCheckMark
Remove check mark against intro pages
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
910dd0584c
commit
9f8731ee51
@ -75,10 +75,18 @@ export class Block extends PureComponent {
|
||||
};
|
||||
}
|
||||
|
||||
renderCheckMark(isCompleted) {
|
||||
return isCompleted ? (
|
||||
<GreenPass style={mapIconStyle} />
|
||||
) : (
|
||||
<GreenNotCompleted style={mapIconStyle} />
|
||||
);
|
||||
}
|
||||
|
||||
renderChallenges(intro = {}, challenges = []) {
|
||||
// TODO: Split this into a Challenge Component and add tests
|
||||
// TODO: The styles badge and map-badge on the completion span do not exist
|
||||
return [intro].concat(challenges).map(challenge => {
|
||||
return [intro].concat(challenges).map((challenge, i) => {
|
||||
const completedClass = challenge.isCompleted
|
||||
? ' map-challenge-title-completed'
|
||||
: '';
|
||||
@ -88,11 +96,7 @@ export class Block extends PureComponent {
|
||||
key={'map-challenge' + challenge.fields.slug}
|
||||
>
|
||||
<span className='badge map-badge'>
|
||||
{challenge.isCompleted ? (
|
||||
<GreenPass style={mapIconStyle} />
|
||||
) : (
|
||||
<GreenNotCompleted style={mapIconStyle} />
|
||||
)}
|
||||
{i !== 0 && this.renderCheckMark(challenge.isCompleted)}
|
||||
</span>
|
||||
<Link
|
||||
onClick={this.handleChallengeClick(challenge.fields.slug)}
|
||||
|
@ -36,17 +36,7 @@ exports[`<Block expanded snapshot: block-expanded 1`] = `
|
||||
>
|
||||
<span
|
||||
className="badge map-badge"
|
||||
>
|
||||
<GreenNotCompleted
|
||||
style={
|
||||
Object {
|
||||
"height": "15px",
|
||||
"marginRight": "10px",
|
||||
"width": "15px",
|
||||
}
|
||||
}
|
||||
/>
|
||||
</span>
|
||||
/>
|
||||
<Unknown
|
||||
onClick={[Function]}
|
||||
to="/super-block-one/block-a"
|
||||
|
Reference in New Issue
Block a user