forked from cerebral/overmind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.tsx
More file actions
27 lines (23 loc) · 675 Bytes
/
index.tsx
File metadata and controls
27 lines (23 loc) · 675 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import * as React from 'react'
import { useAppState } from '../../overmind'
import * as styles from './styles'
import * as text from '../../styles/text'
import Workspace from '../Workspace'
import { css } from 'emotion'
const Devtools: React.FunctionComponent = () => {
const state = useAppState()
if (state.error) {
return (
<div className={styles.wrapper}>
<div className={styles.container}>
<div className={css(text.header, text.white)}>
Ops, there is an error :(
</div>
<div className={text.red}>{state.error}</div>
</div>
</div>
)
}
return <Workspace />
}
export default Devtools