Skip to content

Commit ecac58b

Browse files
committed
add continue option to start new
1 parent f174afa commit ecac58b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

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

+10-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as T from 'typings/graphql'
66
interface Props {
77
tutorial: T.Tutorial
88
onContinue(): void
9+
onNew(): void
910
}
1011

1112
export const ContinuePage = (props: Props) => (
@@ -18,6 +19,12 @@ export const ContinuePage = (props: Props) => (
1819
<Button onClick={props.onContinue}>Resume</Button>
1920
</div>
2021
</Card>
22+
<Card showTitleBullet={false} contentHeight="auto">
23+
<div>
24+
<h2>Start a New Tutorial</h2>
25+
<Button onClick={props.onNew}>Select New Tutorial</Button>
26+
</div>
27+
</Card>
2128
</div>
2229
)
2330

@@ -33,7 +40,9 @@ const ContinuePageContainer = ({ context, send }: ContainerProps) => {
3340
throw new Error('Tutorial not found')
3441
}
3542

36-
return <ContinuePage tutorial={tutorial} onContinue={() => send('TUTORIAL_START')} />
43+
return (
44+
<ContinuePage tutorial={tutorial} onContinue={() => send('TUTORIAL_START')} onNew={() => send('TUTORIAL_SELECT')} />
45+
)
3746
}
3847

3948
export default ContinuePageContainer

web-app/src/services/state/machine.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ export const machine = Machine<CR.MachineContext, CR.MachineStateSchema, CR.Mach
4949
},
5050
ContinueTutorial: {
5151
on: {
52-
TUTORIAL_START: '#tutorial',
52+
TUTORIAL_START: '#tutorial-load-next',
53+
TUTORIAL_SELECT: 'SelectTutorial'
5354
},
5455
},
5556
},

0 commit comments

Comments
 (0)