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

Commit6b0cbff

Browse files
committed
add basic progress tracker
1 parent62ae4cb commit6b0cbff

File tree

1 file changed

+8
-1
lines changed
  • web-app/src/containers/Tutorial/LevelPage

1 file changed

+8
-1
lines changed

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
7878
thrownewError('No Stage steps found')
7979
}
8080

81+
//@ts-ignore
82+
constcurrentStep=level.steps.indexOf(s=>s.status==='ACTIVE')+1
83+
8184
return(
8285
<divcss={styles.page}>
8386
<divcss={styles.header}>
@@ -120,10 +123,14 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
120123
{level.title}
121124
</span>
122125
<span>
123-
{level.status==='COMPLETE'&&(
126+
{level.status==='COMPLETE'?(
124127
<Buttontype="primary"onClick={onContinue}>
125128
Continue
126129
</Button>
130+
) :(
131+
<span>
132+
{currentStep} of{level.steps.length} tasks
133+
</span>
127134
)}
128135
</span>
129136
</div>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp