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

Commit78d9a71

Browse files
committed
no progress on single task level
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parente192e43 commit78d9a71

File tree

2 files changed

+11
-23
lines changed

2 files changed

+11
-23
lines changed

‎web-app/src/containers/Tutorial/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ const TutorialPage = (props: PageProps) => {
161161
max={level.steps.length}
162162
title={tutorial.summary.title}
163163
/>
164-
) :(
164+
) :level.steps.length>1 ?(
165165
<StepProgresscurrent={stepIndex}max={level.steps.length}/>
166-
)}
166+
) :null}
167167
</div>
168168
</div>
169169
<SideMenuvisible={menuVisible}toggleVisible={setMenuVisible}page={page}setPage={setPage}/>

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

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,6 @@ const context: Partial<T.MachineContext> = {
5151
},
5252
hints:['First Hint','Second Hint'],
5353
},
54-
{
55-
id:'1.2',
56-
content:'Should support markdown test\n ```js\nvar a = 1\n```\nwhew it works!',
57-
setup:{
58-
commits:['abcdefg'],
59-
},
60-
solution:{
61-
commits:['hijklmn'],
62-
},
63-
},
64-
{
65-
id:'1.3',
66-
content:'Should support markdown test\n ```js\nvar a = 1\n```\nwhew it works!',
67-
setup:{
68-
commits:['abcdefg'],
69-
},
70-
solution:{
71-
commits:['hijklmn'],
72-
},
73-
},
7454
],
7555
},
7656
{
@@ -161,4 +141,12 @@ const context: Partial<T.MachineContext> = {
161141
storiesOf('Tutorial',module)
162142
.addDecorator(SideBarDecorator)
163143
.addDecorator(withKnobs)
164-
.add('Example',()=><Tutorialcontext={context}send={action('send')}/>)
144+
.add('1 step',()=>{
145+
constfirstLevel={
146+
...context,
147+
position:{levelId:'1',stepId:'1.2'},
148+
progress:{levels:{},steps:{},complete:false},
149+
}
150+
return<Tutorialcontext={firstLevel}send={action('send')}/>
151+
})
152+
.add('3 step',()=><Tutorialcontext={context}send={action('send')}/>)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp