Refactor
This commit is contained in:
@@ -4,15 +4,15 @@ import { Badge, Typography } from '@material-ui/core'
|
||||
import { Theme, withStyles } from '@material-ui/core/styles'
|
||||
|
||||
interface HistoryItem {
|
||||
title: string
|
||||
value: string
|
||||
title: JSX.Element | string
|
||||
value: string | any
|
||||
}
|
||||
|
||||
interface Props {
|
||||
items: HistoryItem[]
|
||||
onClick?: (index: number, element: EventTarget) => void
|
||||
classes: any
|
||||
contentTypeIndicator?: String
|
||||
contentTypeIndicator?: JSX.Element
|
||||
}
|
||||
|
||||
interface State {
|
||||
|
||||
@@ -61,7 +61,7 @@ class MessageHistory extends React.Component<Props, State> {
|
||||
<div>
|
||||
<History
|
||||
items={historyElements}
|
||||
contentTypeIndicator={showPlot ? <BarChart /> : null}
|
||||
contentTypeIndicator={showPlot ? <BarChart /> : undefined}
|
||||
onClick={this.displayMessage}
|
||||
>
|
||||
{showPlot ? this.renderPlot(numericMessages) : null}
|
||||
|
||||
@@ -170,7 +170,6 @@ class Sidebar extends React.Component<Props, State> {
|
||||
size="small"
|
||||
color="secondary"
|
||||
variant="contained"
|
||||
mini={true}
|
||||
style={{ marginTop: '-3px', padding: '0px 4px', minHeight: '24px' }}
|
||||
onClick={this.props.actions.clearRetainedTopic}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user