Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0d1a30a

Browse files
committed
setup continue page
1 parent9f43516 commit0d1a30a

File tree

3 files changed

+15
-18
lines changed

3 files changed

+15
-18
lines changed

‎src/state/machine.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export const machine = Machine<
4646
}
4747
},
4848
}
49-
5049
},
5150
ContinueTutorial: {
5251
onEntry: ['tutorialContinue'],
Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,27 @@
11
import * as React from 'react'
2-
importCRfrom 'typings'
3-
4-
importContinueItemfrom './ContinueItem'
2+
import{ send }from '../../utils/vscode'
3+
import DataContext from '../../utils/DataContext'
4+
import{ Button, Card }from '@alifd/next'
55

66
interface Props {
7-
tutorials: CR.Tutorial[]
8-
onContinue(tutorialId: string): void
9-
// onReset(): void
7+
onContinue(): void
108
}
119

1210
export 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 () => <ContinuePagetutorials={[]}onContinue={(id: string) =>console.log(id)}/>
27+
export default () => <ContinuePage onContinue={() =>{ send('TUTORIAL_START') }}/>

‎web-app/src/containers/Continue/ContinueItem.tsxrenamed to‎web-app/src/containers/New/TutorialItem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ interface Props {
77
onContinue(): void
88
}
99

10-
constContinueItem = (props: Props) => {
10+
constTutorialItem = (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 defaultContinueItem
22+
export defaultTutorialItem

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp