|
1 | 1 | import * as React from 'react'
|
2 |
| -import * as G from 'typings/graphql' |
3 |
| -import * as CR from 'typings' |
| 2 | +import * as T from 'typings' |
4 | 3 |
|
5 |
| -interface Props { |
6 |
| - state: string |
7 |
| - tutorial: G.Tutorial |
8 |
| - env: CR.Environment |
9 |
| - position: CR.Position |
10 |
| - progress: CR.Progress |
11 |
| - children: React.ReactElement |
| 4 | +interface Props extends T.MachineContext { |
| 5 | + state: string |
| 6 | + children: React.ReactElement |
12 | 7 | }
|
13 | 8 |
|
14 |
| -const Debugger = ({ state, children, env, position, progress, tutorial }: Props) => ( |
15 |
| - <div style={{ backgroundColor: '#FFFF99', color: 'black', padding: '.5rem' }}> |
16 |
| - <h4>state: {state}</h4> |
17 |
| - <p>MachineId: {env.machineId}</p> |
18 |
| - <p>SessionId: {env.sessionId}</p> |
19 |
| - <p>tutorial: {tutorial ? tutorial.id : 'none'}</p> |
20 |
| - <p style={{ backgroundColor: 'khaki', padding: '.5rem' }}>position: {JSON.stringify(position)}</p> |
21 |
| - <p style={{ backgroundColor: 'moccasin', padding: '.5rem' }}>progress: {JSON.stringify(progress)}</p> |
22 |
| - {children} |
23 |
| - </div> |
| 9 | +const Debugger = ({ state, children, env, position, progress, processes, tutorial }: Props) => ( |
| 10 | + <div style={{ backgroundColor: '#FFFF99', color: 'black', padding: '.5rem' }}> |
| 11 | + <h4>state: {state}</h4> |
| 12 | + <p>MachineId: {env.machineId}</p> |
| 13 | + <p>SessionId: {env.sessionId}</p> |
| 14 | + <p>tutorial: {tutorial ? tutorial.id : 'none'}</p> |
| 15 | + <p style={{ backgroundColor: 'khaki', padding: '.5rem' }}>position: {JSON.stringify(position)}</p> |
| 16 | + <p style={{ backgroundColor: 'moccasin', padding: '.5rem' }}>progress: {JSON.stringify(progress)}</p> |
| 17 | + <p style={{ backgroundColor: 'beige', padding: '.5rem' }}>processes: {JSON.stringify(processes)}</p> |
| 18 | + {children} |
| 19 | + </div> |
24 | 20 | )
|
25 | 21 |
|
26 | 22 | export default Debugger
|
0 commit comments