aboutsummaryrefslogtreecommitdiffstats
path: root/ui-dev.js
diff options
context:
space:
mode:
authorkumavis <aaron@kumavis.me>2017-09-30 02:50:24 +0800
committerkumavis <aaron@kumavis.me>2017-09-30 02:50:24 +0800
commit19e7adad1920ac506b3ef5c639ec110a2615bd7c (patch)
tree8d696945a0a33eb7b85195b8ac04f07c2e574cdf /ui-dev.js
parentcdf41c28573822c7c4d50efe7dfa34a062825d7f (diff)
downloadtangerine-wallet-browser-19e7adad1920ac506b3ef5c639ec110a2615bd7c.tar
tangerine-wallet-browser-19e7adad1920ac506b3ef5c639ec110a2615bd7c.tar.gz
tangerine-wallet-browser-19e7adad1920ac506b3ef5c639ec110a2615bd7c.tar.bz2
tangerine-wallet-browser-19e7adad1920ac506b3ef5c639ec110a2615bd7c.tar.lz
tangerine-wallet-browser-19e7adad1920ac506b3ef5c639ec110a2615bd7c.tar.xz
tangerine-wallet-browser-19e7adad1920ac506b3ef5c639ec110a2615bd7c.tar.zst
tangerine-wallet-browser-19e7adad1920ac506b3ef5c639ec110a2615bd7c.zip
development - fix ui dev
Diffstat (limited to 'ui-dev.js')
-rw-r--r--ui-dev.js51
1 files changed, 29 insertions, 22 deletions
diff --git a/ui-dev.js b/ui-dev.js
index de5dfd8ef..620d81667 100644
--- a/ui-dev.js
+++ b/ui-dev.js
@@ -61,30 +61,37 @@ const actions = {
var css = MetaMaskUiCss()
injectCss(css)
-const container = document.querySelector('#test-container')
-
// parse opts
var store = configureStore(states[selectedView])
// start app
-render(
- h('.super-dev-container', [
-
- h(Selector, { actions, selectedKey: selectedView, states, store }),
-
- h('#app-content', {
- style: {
- height: '500px',
- width: '360px',
- boxShadow: 'grey 0px 2px 9px',
- margin: '20px',
- },
- }, [
- h(Root, {
- store: store,
- }),
- ]),
-
- ]
-), container)
+startApp()
+
+function startApp(){
+ const body = document.body
+ const container = document.createElement('div')
+ container.id = 'test-container'
+ body.appendChild(container)
+
+ render(
+ h('.super-dev-container', [
+
+ h(Selector, { actions, selectedKey: selectedView, states, store }),
+
+ h('#app-content', {
+ style: {
+ height: '500px',
+ width: '360px',
+ boxShadow: 'grey 0px 2px 9px',
+ margin: '20px',
+ },
+ }, [
+ h(Root, {
+ store: store,
+ }),
+ ]),
+
+ ]
+ ), container)
+}