Skip to content

Commit c5deec2

Browse files
committed
disable continue when processes are running
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent 1c86529 commit c5deec2

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

web-app/src/containers/Tutorial/components/Continue.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ interface Props {
2424
current: number // level index
2525
max: number // level count
2626
defaultOpen: boolean
27+
disabled?: boolean
2728
onContinue(): void
2829
}
2930

@@ -48,12 +49,12 @@ const Continue = (props: Props) => {
4849
return (
4950
<>
5051
{modalState === 'init' ? (
51-
<Button type="primary" size="medium" onClick={onOpen}>
52+
<Button type="primary" size="medium" onClick={onOpen} disabled={props.disabled}>
5253
Continue
5354
</Button>
5455
) : null}
5556
{modalState === 'closed' ? (
56-
<Button type="primary" size="medium" onClick={onContinue}>
57+
<Button type="primary" size="medium" onClick={onContinue} disabled={props.disabled}>
5758
Continue
5859
</Button>
5960
) : null}

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

+2
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ const TutorialPage = (props: PageProps) => {
208208
max={levels.length}
209209
title={tutorial.summary.title}
210210
defaultOpen={false}
211+
disabled={processes.length > 0}
211212
/>
212213
</div>
213214
) : props.state === 'Level.LevelComplete' ? (
@@ -218,6 +219,7 @@ const TutorialPage = (props: PageProps) => {
218219
max={levels.length}
219220
title={tutorial.summary.title}
220221
defaultOpen={true}
222+
disabled={processes.length > 0}
221223
/>
222224
</div>
223225
) : level.steps.length > 1 ? (

0 commit comments

Comments
 (0)