Enforce codestyle

This commit is contained in:
Thomas Nordquist
2019-01-02 16:37:36 +01:00
parent 48aa317c7c
commit 2b7e9a5ef7
24 changed files with 492 additions and 195 deletions

View File

@@ -1,11 +1,11 @@
import * as React from "react";
import * as React from 'react'
import * as q from '../../backend/src/Model'
import { Tree } from "./components/Tree"
import TitleBar from "./components/TitleBar";
import { Sidebar } from "./components/Sidebar";
import { Tree } from './components/Tree'
import TitleBar from './components/TitleBar'
import { Sidebar } from './components/Sidebar'
import { withTheme, Theme } from '@material-ui/core/styles';
import { withTheme, Theme } from '@material-ui/core/styles'
class State {
public selectedNode?: q.TreeNode | undefined
@@ -17,12 +17,12 @@ interface Props {
class App extends React.Component<Props, State> {
constructor(props: any) {
super(props);
super(props)
this.state = {
selectedNode: undefined
selectedNode: undefined,
}
console.log("asd", this.props)
console.log('asd', this.props)
this.theme = this.props.theme
this.styles = {
primaryText: {
@@ -32,7 +32,7 @@ class App extends React.Component<Props, State> {
},
primaryColor: {
backgroundColor: this.theme.palette.background.default,
//padding: `${this.theme.spacing.unit}px ${this.theme.spacing.unit * 2}px`,
// padding: `${this.theme.spacing.unit}px ${this.theme.spacing.unit * 2}px`,
color: this.theme.palette.common.white,
},
}
@@ -45,7 +45,7 @@ class App extends React.Component<Props, State> {
return <div style={this.styles.primaryColor}>
<TitleBar />
<Tree didSelectNode={(node: q.TreeNode) => {
this.setState({selectedNode: node})
this.setState({ selectedNode: node })
console.log('did select', node)
}} />
</div>