Skip to content

Feature/multi stage #23

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 7 commits into from
Jul 24, 2019
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
Next Next commit
rename action to onContinue
  • Loading branch information
ShMcK committed Jul 24, 2019
commit 2825103c8d1159bdb25248a64d5d88c378bf8c95
6 changes: 3 additions & 3 deletions web-app/src/components/Stage/index.tsx
Original file line number Diff line number Diff line change
@@ -28,10 +28,10 @@ interface Props {
[stepId: string]: any // CC.Step
}
complete: boolean
onNextStage(): void
onContinue(): void
}

const Stage = ({ stage, steps, onNextStage, complete }: Props) => {
const Stage = ({ stage, steps, onContinue, complete }: Props) => {
const { stepList, content } = stage
const { title, text } = content
// grab the active step
@@ -61,7 +61,7 @@ const Stage = ({ stage, steps, onNextStage, complete }: Props) => {

{complete && (
<div style={styles.options}>
<Button onClick={onNextStage}>Continue</Button>
<Button onClick={onContinue}>Continue</Button>
</div>
)}
</div>
4 changes: 2 additions & 2 deletions web-app/src/containers/Tutorial/StagePage.tsx
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ const StagePage = (props: PageProps) => {

const stageComplete = progress.stages[stageId] || false

const onNextStage = (): void => {
const onContinue = (): void => {
props.send('STAGE_NEXT')
}

@@ -35,7 +35,7 @@ const StagePage = (props: PageProps) => {
},
}
}
return <Stage stage={stage} steps={steps} onNextStage={onNextStage} complete={stageComplete} />
return <Stage stage={stage} steps={steps} onContinue={onContinue} complete={stageComplete} />
}

export default StagePage
2 changes: 1 addition & 1 deletion web-app/src/containers/Tutorial/index.tsx
Original file line number Diff line number Diff line change
@@ -18,7 +18,7 @@ const Tutorial = (props: Props) => {
return (
<Router state={props.state}>
<Route path="Tutorial.LoadNext">
<LoadingPage text="Loading Tutorial..." />
<LoadingPage text="Loading..." />
</Route>
<Route path="Tutorial.Summary">
<SummaryPage send={send} />
2 changes: 1 addition & 1 deletion web-app/stories/Stage.stories.tsx
Original file line number Diff line number Diff line change
@@ -51,6 +51,6 @@ function someExample(a) {
})}
stage={object('stage', demo.data.stages.stage1Id)}
complete={boolean('complete', false)}
onNextStage={action('onNextStage')}
onContinue={action('onContinue')}
/>
))