aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/assets/components/Body.jsx
diff options
context:
space:
mode:
authorKurkó Mihály <kurkomisi@users.noreply.github.com>2018-01-24 04:51:04 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-01-24 04:51:04 +0800
commit05ade19302357eba6a24348f31df140ce0eca326 (patch)
tree50010a6f94401d7cc1829d36ea99d342d2825d39 /dashboard/assets/components/Body.jsx
parentec96216d1696bca2671bb7d043ba6af02c20738d (diff)
downloadgo-tangerine-05ade19302357eba6a24348f31df140ce0eca326.tar
go-tangerine-05ade19302357eba6a24348f31df140ce0eca326.tar.gz
go-tangerine-05ade19302357eba6a24348f31df140ce0eca326.tar.bz2
go-tangerine-05ade19302357eba6a24348f31df140ce0eca326.tar.lz
go-tangerine-05ade19302357eba6a24348f31df140ce0eca326.tar.xz
go-tangerine-05ade19302357eba6a24348f31df140ce0eca326.tar.zst
go-tangerine-05ade19302357eba6a24348f31df140ce0eca326.zip
dashboard: CPU, memory, diskIO and traffic on the footer (#15950)
* dashboard: footer, deep state update * dashboard: resolve asset path * dashboard: prevent state update on every reconnection * dashboard: fix linter issue * dashboard, cmd: minor UI fix, include commit hash * dashboard: gitCommit renamed to commit * dashboard: move the geth version to the right, make commit optional * dashboard: memory, traffic and CPU on footer * dashboard: fix merge * dashboard: CPU, diskIO on footer * dashboard: rename variables, use group declaration * dashboard: docs
Diffstat (limited to 'dashboard/assets/components/Body.jsx')
-rw-r--r--dashboard/assets/components/Body.jsx19
1 files changed, 8 insertions, 11 deletions
diff --git a/dashboard/assets/components/Body.jsx b/dashboard/assets/components/Body.jsx
index 14e9ac358..054e04064 100644
--- a/dashboard/assets/components/Body.jsx
+++ b/dashboard/assets/components/Body.jsx
@@ -18,35 +18,32 @@
import React, {Component} from 'react';
-import withStyles from 'material-ui/styles/withStyles';
-
import SideBar from './SideBar';
import Main from './Main';
import type {Content} from '../types/content';
-// Styles for the Body component.
-const styles = () => ({
+// styles contains the constant styles of the component.
+const styles = {
body: {
display: 'flex',
width: '100%',
height: '100%',
},
-});
+};
+
export type Props = {
- classes: Object,
opened: boolean,
- changeContent: () => {},
+ changeContent: string => void,
active: string,
content: Content,
shouldUpdate: Object,
};
+
// Body renders the body of the dashboard.
class Body extends Component<Props> {
render() {
- const {classes} = this.props; // The classes property is injected by withStyles().
-
return (
- <div className={classes.body}>
+ <div style={styles.body}>
<SideBar
opened={this.props.opened}
changeContent={this.props.changeContent}
@@ -61,4 +58,4 @@ class Body extends Component<Props> {
}
}
-export default withStyles(styles)(Body);
+export default Body;