Clean up
This commit is contained in:
@@ -2,28 +2,16 @@ import * as React from 'react'
|
||||
import * as q from '../../../../backend/src/Model'
|
||||
// import Drawer from '@material-ui/core/Drawer'
|
||||
import { Typography } from '@material-ui/core'
|
||||
import { withStyles, Theme, StyleRulesCallback } from '@material-ui/core/styles'
|
||||
|
||||
interface Props {
|
||||
node: q.TreeNode,
|
||||
classes: any,
|
||||
theme: Theme
|
||||
node: q.TreeNode
|
||||
}
|
||||
|
||||
interface State {
|
||||
node?: q.TreeNode | undefined
|
||||
}
|
||||
|
||||
class NodeStats extends React.Component<Props, State> {
|
||||
class NodeStats extends React.Component<Props, {}> {
|
||||
constructor(props: any) {
|
||||
super(props)
|
||||
}
|
||||
|
||||
public static styles: StyleRulesCallback<string> = (theme: Theme) => {
|
||||
return {
|
||||
}
|
||||
}
|
||||
|
||||
public render() {
|
||||
const { node } = this.props
|
||||
|
||||
@@ -35,4 +23,4 @@ class NodeStats extends React.Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default withStyles(NodeStats.styles, { withTheme: true })(NodeStats)
|
||||
export default NodeStats
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import * as React from 'react'
|
||||
import * as q from '../../../../backend/src/Model'
|
||||
// import Drawer from '@material-ui/core/Drawer'
|
||||
import ExpansionPanel from '@material-ui/core/ExpansionPanel'
|
||||
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'
|
||||
import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails'
|
||||
import { ExpansionPanel, ExpansionPanelDetails, ExpansionPanelSummary, Typography } from '@material-ui/core'
|
||||
import { withStyles, Theme, StyleRulesCallback } from '@material-ui/core/styles'
|
||||
import ExpandMore from '@material-ui/icons/ExpandMore'
|
||||
|
||||
import Copy from '../Copy'
|
||||
import ValueRenderer from './ValueRenderer'
|
||||
import NodeStats from './NodeStats'
|
||||
import Topic from './Topic'
|
||||
import { Typography } from '@material-ui/core'
|
||||
import { withStyles, Theme, StyleRulesCallback } from '@material-ui/core/styles'
|
||||
import Copy from '../Copy'
|
||||
|
||||
interface Props {
|
||||
node?: q.TreeNode,
|
||||
@@ -19,7 +16,7 @@ interface Props {
|
||||
}
|
||||
|
||||
interface State {
|
||||
node?: q.TreeNode
|
||||
node: q.TreeNode
|
||||
}
|
||||
|
||||
class Sidebar extends React.Component<Props, State> {
|
||||
@@ -29,6 +26,7 @@ class Sidebar extends React.Component<Props, State> {
|
||||
|
||||
constructor(props: any) {
|
||||
super(props)
|
||||
console.warn('Find and fix me #state')
|
||||
this.state = { node: new q.Tree() }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as React from 'react'
|
||||
import * as q from '../../../../backend/src/Model'
|
||||
import { withStyles, Theme, StyleRulesCallback } from '@material-ui/core/styles'
|
||||
import Button from '@material-ui/core/Button'
|
||||
import { withStyles, Theme, StyleRulesCallback } from '@material-ui/core/styles'
|
||||
|
||||
interface Props {
|
||||
classes: any
|
||||
@@ -11,15 +11,15 @@ interface Props {
|
||||
didSelectNode: (node: q.TreeNode) => void
|
||||
}
|
||||
|
||||
class Topic extends React.Component<Props, {}> {
|
||||
public static styles: StyleRulesCallback<string> = (theme: Theme) => ({
|
||||
button: {
|
||||
textTransform: 'none',
|
||||
padding: '3px 5px 3px 5px',
|
||||
minWidth: '30px',
|
||||
},
|
||||
})
|
||||
const styles: StyleRulesCallback<string> = (theme: Theme) => ({
|
||||
button: {
|
||||
textTransform: 'none',
|
||||
padding: '3px 5px 3px 5px',
|
||||
minWidth: '30px',
|
||||
},
|
||||
})
|
||||
|
||||
class Topic extends React.Component<Props, {}> {
|
||||
public render() {
|
||||
const { node } = this.props
|
||||
if (!node) {
|
||||
@@ -54,4 +54,4 @@ class Topic extends React.Component<Props, {}> {
|
||||
}
|
||||
}
|
||||
|
||||
export default withStyles(Topic.styles, { withTheme: true })(Topic)
|
||||
export default withStyles(styles, { withTheme: true })(Topic)
|
||||
|
||||
@@ -27,10 +27,6 @@ class ValueRenderer extends React.Component<Props, State> {
|
||||
nextProps.node && nextProps.node.onMessage.subscribe(this.updateNode)
|
||||
}
|
||||
|
||||
private style = (theme: Theme) => {
|
||||
|
||||
}
|
||||
|
||||
public render() {
|
||||
const node = this.props.node
|
||||
if (!node || !node.message) {
|
||||
|
||||
Reference in New Issue
Block a user