aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/assets/index.jsx
diff options
context:
space:
mode:
authorKurkó Mihály <kurkomisi@users.noreply.github.com>2017-12-21 23:54:38 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-12-21 23:54:38 +0800
commit9dbb8ef4aadb8e40aef8b681cf86acd20789abdc (patch)
treec020de9b45dffa878b1422dce147d9343ed8b59b /dashboard/assets/index.jsx
parent52f4d6dd7891191a494f37faa6bce664e202da66 (diff)
downloaddexon-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar
dexon-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.gz
dexon-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.bz2
dexon-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.lz
dexon-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.xz
dexon-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.tar.zst
dexon-9dbb8ef4aadb8e40aef8b681cf86acd20789abdc.zip
dashboard: integrate Flow, sketch message API (#15713)
* dashboard: minor design change * dashboard: Flow integration, message API * dashboard: minor polishes, exclude misspell linter
Diffstat (limited to 'dashboard/assets/index.jsx')
-rw-r--r--dashboard/assets/index.jsx29
1 files changed, 17 insertions, 12 deletions
diff --git a/dashboard/assets/index.jsx b/dashboard/assets/index.jsx
index 1e5fdc892..e10095baf 100644
--- a/dashboard/assets/index.jsx
+++ b/dashboard/assets/index.jsx
@@ -1,3 +1,5 @@
+// @flow
+
// Copyright 2017 The go-ethereum Authors
// This file is part of the go-ethereum library.
//
@@ -15,22 +17,25 @@
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
import React from 'react';
-import {hydrate} from 'react-dom';
-import {createMuiTheme, MuiThemeProvider} from 'material-ui/styles';
+import {render} from 'react-dom';
+
+import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
+import createMuiTheme from 'material-ui/styles/createMuiTheme';
-import Dashboard from './components/Dashboard.jsx';
+import Dashboard from './components/Dashboard';
-// Theme for the dashboard.
const theme = createMuiTheme({
palette: {
type: 'dark',
},
});
-
-// Renders the whole dashboard.
-hydrate(
- <MuiThemeProvider theme={theme}>
- <Dashboard />
- </MuiThemeProvider>,
- document.getElementById('dashboard')
-);
+const dashboard = document.getElementById('dashboard');
+if (dashboard) {
+ // Renders the whole dashboard.
+ render(
+ <MuiThemeProvider theme={theme}>
+ <Dashboard />
+ </MuiThemeProvider>,
+ dashboard,
+ );
+}