Skip to content

Feature/show command running #58

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Nov 18, 2019
Prev Previous commit
Next Next commit
fix level index
  • Loading branch information
ShMcK committed Nov 17, 2019
commit 5133dadf3088edc1e55ee4f94e12e4aacb25d3f9
3 changes: 2 additions & 1 deletion web-app/src/containers/Tutorial/LevelPage/Level.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,8 @@ const Level = ({ level, onContinue, onLoadSolution }: Props) => {
<div>
<div style={styles.footer}>
<span>
{level.index ? `${level.index.toString()}.` : ''} {level.title}
{typeof level.index === 'number' ? `${level.index + 1}. ` : ''}
{level.title}
</span>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions web-app/stories/Level.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ storiesOf('Level', module)
.add('Level', () => {
const level = {
id: 'L1',
index: 2,
index: 0,
title: 'A Title',
description: 'A summary of the level',
content: 'Some content here in markdown',
Expand Down Expand Up @@ -77,6 +77,7 @@ storiesOf('Level', module)
.add('Level 2', () => {
const level = {
id: 'L1',
index: 1,
title: 'A Title',
description: 'A description',
content: 'Should support markdown test\n ```js\nvar a = 1\n```\nwhew it works!',
Expand Down Expand Up @@ -115,7 +116,6 @@ storiesOf('Level', module)
status: 'INCOMPLETE',
},
],
index: 0,
status: 'ACTIVE',
}
return <Level level={level} onContinue={action('onContinue')} onLoadSolution={action('onLoadSolution')} />
Expand Down