Skip to content

Feature/progress tasks #104

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 2 commits into from
Feb 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add basic progress tracker
  • Loading branch information
ShMcK committed Feb 3, 2020
commit 6b0cbff91b30c761f7f80479987def7208719be2
9 changes: 8 additions & 1 deletion web-app/src/containers/Tutorial/LevelPage/Level.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
throw new Error('No Stage steps found')
}

// @ts-ignore
const currentStep = level.steps.indexOf(s => s.status === 'ACTIVE') + 1

return (
<div css={styles.page}>
<div css={styles.header}>
Expand Down Expand Up @@ -120,10 +123,14 @@ const Level = ({ level, onContinue, onLoadSolution, processes, testStatus }: Pro
{level.title}
</span>
<span>
{level.status === 'COMPLETE' && (
{level.status === 'COMPLETE' ? (
<Button type="primary" onClick={onContinue}>
Continue
</Button>
) : (
<span>
{currentStep} of {level.steps.length} tasks
</span>
)}
</span>
</div>
Expand Down