Fix some linting issues

This commit is contained in:
Chen-I Lim 2020-10-21 16:17:31 -07:00
parent fe881b001d
commit 6278858889
2 changed files with 13 additions and 12 deletions

View file

@ -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,7 +80,8 @@ 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) => (
<Menu.Text
key={view.id} key={view.id}
id={view.id} id={view.id}
name={view.title} name={view.title}

View file

@ -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')
} }
} }