Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5133dad

Browse files
committed
fix level index
1 parent0ee8b05 commit5133dad

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎web-app/src/containers/Tutorial/LevelPage/Level.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ const Level = ({ level, onContinue, onLoadSolution }: Props) => {
100100
<div>
101101
<divstyle={styles.footer}>
102102
<span>
103-
{level.index ?`${level.index.toString()}.` :''}{level.title}
103+
{typeoflevel.index==='number' ?`${level.index+1}. ` :''}
104+
{level.title}
104105
</span>
105106
</div>
106107
</div>

‎web-app/stories/Level.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ storiesOf('Level', module)
2121
.add('Level',()=>{
2222
constlevel={
2323
id:'L1',
24-
index:2,
24+
index:0,
2525
title:'A Title',
2626
description:'A summary of the level',
2727
content:'Some content here in markdown',
@@ -77,6 +77,7 @@ storiesOf('Level', module)
7777
.add('Level 2',()=>{
7878
constlevel={
7979
id:'L1',
80+
index:1,
8081
title:'A Title',
8182
description:'A description',
8283
content:'Should support markdown test\n ```js\nvar a = 1\n```\nwhew it works!',
@@ -115,7 +116,6 @@ storiesOf('Level', module)
115116
status:'INCOMPLETE',
116117
},
117118
],
118-
index:0,
119119
status:'ACTIVE',
120120
}
121121
return<Levellevel={level}onContinue={action('onContinue')}onLoadSolution={action('onLoadSolution')}/>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp