Fix code-style
This commit is contained in:
@@ -16,4 +16,4 @@ export enum CodeBlockColorsBraceMonokai {
|
||||
string = '#E6DB74',
|
||||
variable = '#A6E22E',
|
||||
gutters = '#2F3129',
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class CodeDiff extends React.Component<Props, {}> {
|
||||
super(props)
|
||||
}
|
||||
|
||||
private renderChangeAmount(changes: Diff.Change[]) {
|
||||
private renderChangeAmount(changes: Array<Diff.Change>) {
|
||||
const additions = changes.map(change => (change.added === true) ? (change.count || 0) : 0).reduce((a, b) => a + b)
|
||||
const deletions = changes.map(change => (change.removed === true) ? (change.count || 0) : 0).reduce((a, b) => a + b)
|
||||
if (additions === 0 && deletions === 0) {
|
||||
|
||||
@@ -10,7 +10,7 @@ interface HistoryItem {
|
||||
}
|
||||
|
||||
interface Props {
|
||||
items: HistoryItem[]
|
||||
items: Array<HistoryItem>
|
||||
onClick?: (index: number, element: EventTarget) => void
|
||||
classes: any
|
||||
contentTypeIndicator?: JSX.Element
|
||||
|
||||
@@ -25,7 +25,6 @@ import {
|
||||
withTheme,
|
||||
} from '@material-ui/core'
|
||||
|
||||
// tslint:disable-next-line
|
||||
import { default as AceEditor } from 'react-ace'
|
||||
import { AppState } from '../../../reducers'
|
||||
import History from '../History'
|
||||
@@ -52,7 +51,7 @@ interface Props {
|
||||
}
|
||||
|
||||
interface State {
|
||||
history: Message[]
|
||||
history: Array<Message>
|
||||
}
|
||||
|
||||
class Publish extends React.Component<Props, State> {
|
||||
@@ -97,7 +96,7 @@ class Publish extends React.Component<Props, State> {
|
||||
// Remove duplicates
|
||||
let filteredHistory = this.state.history.filter(e => e.payload !== payload || e.topic !== topic)
|
||||
filteredHistory = filteredHistory.slice(-7)
|
||||
const history: Message[] = [...filteredHistory, { topic, payload, sent: new Date() }]
|
||||
const history: Array<Message> = [...filteredHistory, { topic, payload, sent: new Date() }]
|
||||
this.setState({ history })
|
||||
}
|
||||
|
||||
|
||||
@@ -191,7 +191,7 @@ const styles: StyleRulesCallback<string> = (theme: Theme) => {
|
||||
},
|
||||
toggleButton: {
|
||||
height: '36px',
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user