Skip to content

Commit 821548d

Browse files
committed
cleanup continue page design
1 parent 56b7ee0 commit 821548d

File tree

2 files changed

+67
-58
lines changed

2 files changed

+67
-58
lines changed

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

+41-32
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,61 @@ import * as CR from 'typings'
55
import * as G from 'typings/graphql'
66

77
const styles = {
8-
page: {
9-
position: 'relative' as 'relative',
10-
width: '100%',
11-
},
8+
page: {
9+
position: 'relative' as 'relative',
10+
width: '100%',
11+
},
12+
header: {
13+
height: '36px',
14+
backgroundColor: '#EBEBEB',
15+
fontSize: '16px',
16+
lineHeight: '16px',
17+
padding: '10px 1rem',
18+
},
1219
}
1320

1421
interface Props {
15-
tutorial: G.Tutorial
16-
onContinue(): void
17-
onNew(): void
22+
tutorial: G.Tutorial
23+
onContinue(): void
24+
onNew(): void
1825
}
1926

2027
export const ContinuePage = (props: Props) => (
21-
<div style={styles.page}>
22-
<h3>Continue</h3>
23-
<Card>
24-
<div>
25-
<h2>{props.tutorial.version.summary.title}</h2>
26-
<p>{props.tutorial.version.summary.description}</p>
27-
<Button onClick={props.onContinue}>Resume</Button>
28-
</div>
29-
</Card>
30-
<Card>
31-
<div>
32-
<h2>Start a New Tutorial</h2>
33-
<Button onClick={props.onNew}>Select New Tutorial</Button>
34-
</div>
35-
</Card>
36-
</div>
28+
<div style={styles.page}>
29+
<div style={styles.header}>
30+
<span>CodeRoad</span>
31+
</div>
32+
<Card>
33+
<div>
34+
<h2>{props.tutorial.version.summary.title}</h2>
35+
<p>{props.tutorial.version.summary.description}</p>
36+
<Button onClick={props.onContinue}>Resume</Button>
37+
</div>
38+
</Card>
39+
<Card>
40+
<div>
41+
<h2>Start a New Tutorial</h2>
42+
<Button onClick={props.onNew}>Select New Tutorial</Button>
43+
</div>
44+
</Card>
45+
</div>
3746
)
3847

3948
interface ContainerProps {
40-
context: CR.MachineContext
41-
send(action: CR.Action | string): void
49+
context: CR.MachineContext
50+
send(action: CR.Action | string): void
4251
}
4352

4453
const ContinuePageContainer = ({ context, send }: ContainerProps) => {
45-
const { tutorial } = context
54+
const { tutorial } = context
4655

47-
if (!tutorial) {
48-
throw new Error('Tutorial not found')
49-
}
56+
if (!tutorial) {
57+
throw new Error('Tutorial not found')
58+
}
5059

51-
return (
52-
<ContinuePage tutorial={tutorial} onContinue={() => send('TUTORIAL_START')} onNew={() => send('TUTORIAL_SELECT')} />
53-
)
60+
return (
61+
<ContinuePage tutorial={tutorial} onContinue={() => send('TUTORIAL_START')} onNew={() => send('TUTORIAL_SELECT')} />
62+
)
5463
}
5564

5665
export default ContinuePageContainer

web-app/src/containers/New/NewPage.tsx

+26-26
Original file line numberDiff line numberDiff line change
@@ -3,38 +3,38 @@ import * as G from 'typings/graphql'
33
import TutorialList from './TutorialList'
44

55
const styles = {
6-
page: {
7-
position: 'relative' as 'relative',
8-
width: '100%',
9-
},
10-
header: {
11-
height: '36px',
12-
backgroundColor: '#EBEBEB',
13-
fontSize: '16px',
14-
lineHeight: '16px',
15-
padding: '10px 1rem',
16-
},
17-
banner: {
18-
height: '50px',
19-
fontSize: '1rem',
20-
padding: '1rem',
21-
},
6+
page: {
7+
position: 'relative' as 'relative',
8+
width: '100%',
9+
},
10+
header: {
11+
height: '36px',
12+
backgroundColor: '#EBEBEB',
13+
fontSize: '16px',
14+
lineHeight: '16px',
15+
padding: '10px 1rem',
16+
},
17+
banner: {
18+
height: '50px',
19+
fontSize: '1rem',
20+
padding: '1rem',
21+
},
2222
}
2323

2424
interface Props {
25-
tutorialList: G.Tutorial[]
25+
tutorialList: G.Tutorial[]
2626
}
2727

2828
const NewPage = (props: Props) => (
29-
<div style={styles.page}>
30-
<div style={styles.header}>
31-
<span>CodeRoad</span>
32-
</div>
33-
<div style={styles.banner}>
34-
<span>Select a Tutorial to Start</span>
35-
</div>
36-
<TutorialList tutorialList={props.tutorialList} />
37-
</div>
29+
<div style={styles.page}>
30+
<div style={styles.header}>
31+
<span>CodeRoad</span>
32+
</div>
33+
<div style={styles.banner}>
34+
<span>Select a Tutorial to Start</span>
35+
</div>
36+
<TutorialList tutorialList={props.tutorialList} />
37+
</div>
3838
)
3939

4040
export default NewPage

0 commit comments

Comments
 (0)