Skip to content

Commit 204840f

Browse files
committed
update level stories & structure
1 parent 2b16a0b commit 204840f

File tree

2 files changed

+47
-36
lines changed

2 files changed

+47
-36
lines changed

web-app/src/containers/Tutorial/LevelSummaryPage/index.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const LevelSummaryPage = (props: LevelProps) => {
1818
const onBack = (): void => {
1919
props.send('BACK')
2020
}
21-
console.log('props', props)
2221
return <Level level={props.level} onNext={onNext} onBack={onBack} />
2322
}
2423

web-app/stories/Level.stories.tsx

+47-35
Original file line numberDiff line numberDiff line change
@@ -16,53 +16,65 @@ storiesOf('Tutorial SideBar', module)
1616
.add('Level', () => (
1717
<Level
1818
level={object('level', {
19-
content: {
20-
text: 'A description of this stage',
21-
title: 'Sum Level',
22-
},
23-
stageList: ['stage1Id', 'stage2Id', 'stage3Id'],
24-
})}
25-
stages={object('stages', {
26-
stage1Id: {
27-
content: {
28-
text: 'some description',
19+
id: '1',
20+
title: 'Sum Level',
21+
text: 'A description of this stage',
22+
stages: [
23+
{
24+
id: '1',
2925
title: 'First',
30-
},
31-
status: {
32-
active: false,
33-
complete: true,
34-
},
35-
stepList: [],
36-
},
37-
stage2Id: {
38-
content: {
3926
text: 'some description',
40-
title: 'Second',
27+
status: 'COMPLETED',
4128
},
42-
status: {
43-
active: true,
44-
complete: false,
29+
{
30+
id: '2',
31+
title: 'Second',
32+
text: 'The second one',
33+
status: 'ACTIVE',
4534
},
46-
stepList: [],
47-
},
48-
stage3Id: {
49-
content: {
50-
text: 'some description',
35+
{
36+
id: '3',
5137
title: 'Third',
38+
text: 'The third one',
39+
status: 'INCOMPLETE',
5240
},
53-
status: {
54-
active: false,
55-
complete: false,
56-
},
57-
stepList: [],
58-
},
41+
],
5942
})}
6043
onNext={linkTo('Tutorial SideBar', 'Stage')}
6144
onBack={linkTo('TUtorial SideBar', 'Summary')}
6245
/>
6346
))
6447
.add('Level Summary', () => {
65-
return <LevelSummaryPage send={action('send')} levels={[]} />
48+
return (
49+
<LevelSummaryPage
50+
send={action('send')}
51+
level={{
52+
id: '1',
53+
title: 'Sum Level',
54+
text: 'A description of this stage',
55+
stages: [
56+
{
57+
id: '1',
58+
title: 'First',
59+
text: 'some description',
60+
status: 'COMPLETE',
61+
},
62+
{
63+
id: '2',
64+
title: 'Second',
65+
text: 'The second one',
66+
status: 'ACTIVE',
67+
},
68+
{
69+
id: '3',
70+
title: 'Third',
71+
text: 'The third one',
72+
status: 'INCOMPLETE',
73+
},
74+
],
75+
}}
76+
/>
77+
)
6678
})
6779
.addDecorator(apolloProvider)
6880
.add('Level Summary Container', () => {

0 commit comments

Comments
 (0)