Skip to content

Commit 6bc94f0

Browse files
authored
Merge pull request #443 from coderoad/consistent-continue
Consistent continue
2 parents 0ca7efc + 0c71db0 commit 6bc94f0

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

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

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ interface Props {
2828
}
2929

3030
const Continue = (props: Props) => {
31-
const [modalState, setModalState] = React.useState<'closed' | 'open'>(props.defaultOpen ? 'open' : 'closed')
31+
const [modalState, setModalState] = React.useState<'init' | 'closed' | 'open'>(props.defaultOpen ? 'open' : 'closed')
3232

3333
const onClose = () => {
3434
setModalState('closed')
@@ -47,11 +47,16 @@ const Continue = (props: Props) => {
4747

4848
return (
4949
<>
50-
{modalState === 'closed' ? (
50+
{modalState === 'init' ? (
5151
<Button type="primary" size="medium" onClick={onOpen}>
5252
Continue
5353
</Button>
5454
) : null}
55+
{modalState === 'closed' ? (
56+
<Button type="primary" size="medium" onClick={onContinue}>
57+
Continue
58+
</Button>
59+
) : null}
5560
<Dialog
5661
title={isComplete ? 'Tutorial Complete!' : 'Level Complete!'}
5762
visible={modalState === 'open'}

0 commit comments

Comments
 (0)