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
46 lines (40 loc) · 924 Bytes
/
index.tsx
File metadata and controls
46 lines (40 loc) · 924 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// @ts-ignore
import * as iconFont from './icomoon.woff2'
import * as React from 'react'
import { render } from 'react-dom'
import Devtools from './components/Devtools'
import { ThemeProvider, injectGlobal } from './styled-components'
import { overmind } from 'overmind-themes'
import app from './app'
injectGlobal`
@font-face {
font-family: 'icomoon';
src: url('${iconFont}') format('woff2');
font-weight: normal;
font-style: normal;
}
html, body {
margin: 0;
height: 100%;
}
body {
overflow: hidden;
font-family: Helvetica Neue;
line-height: 24px;
}
#app {
height: 100%;
}
`
window.onerror = (_, _2, _3, _4, error) => {
app.actions.setError(error.message)
}
const container = document.createElement('div')
container.id = 'app'
document.body.appendChild(container)
render(
<ThemeProvider theme={overmind}>
<Devtools />
</ThemeProvider>,
container
)