File tree Expand file tree Collapse file tree 3 files changed +15
-18
lines changed Expand file tree Collapse file tree 3 files changed +15
-18
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ export const machine = Machine<
4646 }
4747 } ,
4848 }
49-
5049 } ,
5150 ContinueTutorial : {
5251 onEntry : [ 'tutorialContinue' ] ,
Original file line number Diff line number Diff line change 11import * as React from 'react'
2- import CR from 'typings '
3-
4- import ContinueItem from './ContinueItem '
2+ import { send } from '../../utils/vscode '
3+ import DataContext from '../../utils/DataContext'
4+ import { Button , Card } from '@alifd/next '
55
66interface Props {
7- tutorials : CR . Tutorial [ ]
8- onContinue ( tutorialId : string ) : void
9- // onReset(): void
7+ onContinue ( ) : void
108}
119
1210export const ContinuePage = ( props : Props ) => {
1311 // context
12+ const { data } = React . useContext ( DataContext )
1413 return (
1514 < div >
1615 < h3 > Continue</ h3 >
17- { props . tutorials . map ( ( tutorial : CR . Tutorial ) => (
18- < ContinueItem
19- key = { tutorial . id }
20- onContinue = { ( ) => props . onContinue ( tutorial . id ) }
21- title = { tutorial . data . summary . title }
22- description = { tutorial . data . summary . description }
23- />
24- ) ) }
16+ < Card showTitleBullet = { false } contentHeight = "auto" >
17+ < div >
18+ < h2 > { data . summary . title } </ h2 >
19+ < p > { data . summary . description } </ p >
20+ < Button onClick = { props . onContinue } > Resume</ Button >
21+ </ div >
22+ </ Card >
2523 </ div >
2624 )
2725}
2826
29- export default ( ) => < ContinuePage tutorials = { [ ] } onContinue = { ( id : string ) => console . log ( id ) } />
27+ export default ( ) => < ContinuePage onContinue = { ( ) => { send ( 'TUTORIAL_START' ) } } />
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ interface Props {
77 onContinue ( ) : void
88}
99
10- const ContinueItem = ( props : Props ) => {
10+ const TutorialItem = ( props : Props ) => {
1111 return (
1212 < Card showTitleBullet = { false } contentHeight = "auto" >
1313 < div >
@@ -19,4 +19,4 @@ const ContinueItem = (props: Props) => {
1919 )
2020}
2121
22- export default ContinueItem
22+ export default TutorialItem
You can’t perform that action at this time.
0 commit comments