Fix some linting issues
This commit is contained in:
parent
fe881b001d
commit
6278858889
2 changed files with 13 additions and 12 deletions
|
@ -3,7 +3,7 @@
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
import {Board} from '../blocks/board'
|
import {Board} from '../blocks/board'
|
||||||
import {BoardView, MutableBoardView} from '../blocks/boardView'
|
import {MutableBoardView} from '../blocks/boardView'
|
||||||
import {BoardTree} from '../viewModel/boardTree'
|
import {BoardTree} from '../viewModel/boardTree'
|
||||||
import mutator from '../mutator'
|
import mutator from '../mutator'
|
||||||
import {Utils} from '../utils'
|
import {Utils} from '../utils'
|
||||||
|
@ -16,8 +16,8 @@ type Props = {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class ViewMenu extends React.Component<Props> {
|
export default class ViewMenu extends React.Component<Props> {
|
||||||
handleDeleteView = async (id: string) => {
|
handleDeleteView = async () => {
|
||||||
const {board, boardTree, showView} = this.props
|
const {boardTree, showView} = this.props
|
||||||
Utils.log('deleteView')
|
Utils.log('deleteView')
|
||||||
const view = boardTree.activeView
|
const view = boardTree.activeView
|
||||||
const nextView = boardTree.views.find((o) => o !== view)
|
const nextView = boardTree.views.find((o) => o !== view)
|
||||||
|
@ -32,7 +32,7 @@ export default class ViewMenu extends React.Component<Props> {
|
||||||
showView(view.id)
|
showView(view.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
handleAddViewBoard = async (id: string) => {
|
handleAddViewBoard = async () => {
|
||||||
const {board, boardTree, showView} = this.props
|
const {board, boardTree, showView} = this.props
|
||||||
Utils.log('addview-board')
|
Utils.log('addview-board')
|
||||||
const view = new MutableBoardView()
|
const view = new MutableBoardView()
|
||||||
|
@ -53,7 +53,7 @@ export default class ViewMenu extends React.Component<Props> {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleAddViewTable = async (id: string) => {
|
handleAddViewTable = async () => {
|
||||||
const {board, boardTree, showView} = this.props
|
const {board, boardTree, showView} = this.props
|
||||||
|
|
||||||
Utils.log('addview-table')
|
Utils.log('addview-table')
|
||||||
|
@ -80,12 +80,13 @@ export default class ViewMenu extends React.Component<Props> {
|
||||||
const {boardTree} = this.props
|
const {boardTree} = this.props
|
||||||
return (
|
return (
|
||||||
<Menu>
|
<Menu>
|
||||||
{boardTree.views.map((view) => (<Menu.Text
|
{boardTree.views.map((view) => (
|
||||||
key={view.id}
|
<Menu.Text
|
||||||
id={view.id}
|
key={view.id}
|
||||||
name={view.title}
|
id={view.id}
|
||||||
onClick={this.handleViewClick}
|
name={view.title}
|
||||||
/>))}
|
onClick={this.handleViewClick}
|
||||||
|
/>))}
|
||||||
<Menu.Separator/>
|
<Menu.Separator/>
|
||||||
{boardTree.views.length > 1 && <Menu.Text
|
{boardTree.views.length > 1 && <Menu.Text
|
||||||
id='__deleteView'
|
id='__deleteView'
|
||||||
|
|
|
@ -92,7 +92,7 @@ class OctoListener {
|
||||||
default:
|
default:
|
||||||
Utils.logError(`Unexpected action: ${message.action}`)
|
Utils.logError(`Unexpected action: ${message.action}`)
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (err) {
|
||||||
Utils.log('message is not an object')
|
Utils.log('message is not an object')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue