Update prettier
This commit is contained in:
@@ -85,7 +85,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(ChartPreview)
|
||||
export default connect(undefined, mapDispatchToProps)(ChartPreview)
|
||||
|
||||
@@ -9,9 +9,11 @@ interface Props {
|
||||
}
|
||||
|
||||
function changeAmount(props: Props) {
|
||||
const additions = props.changes.map(change => (change.added === true ? change.count || 0 : 0)).reduce((a, b) => a + b)
|
||||
const additions = props.changes
|
||||
.map((change) => (change.added === true ? change.count || 0 : 0))
|
||||
.reduce((a, b) => a + b)
|
||||
const deletions = props.changes
|
||||
.map(change => (change.removed === true ? change.count || 0 : 0))
|
||||
.map((change) => (change.removed === true ? change.count || 0 : 0))
|
||||
.reduce((a, b) => a + b)
|
||||
if (additions === 0 && deletions === 0) {
|
||||
return null
|
||||
|
||||
@@ -30,7 +30,7 @@ function useHistory(): [Array<Message>, (topic: string, payload?: string) => voi
|
||||
const amendToHistory = useCallback(
|
||||
(topic: string, payload?: string) => {
|
||||
// Remove duplicates
|
||||
let filteredHistory = history.filter(e => e.payload !== payload || e.topic !== topic)
|
||||
let filteredHistory = history.filter((e) => e.payload !== payload || e.topic !== topic)
|
||||
filteredHistory = filteredHistory.slice(-7)
|
||||
setHistory([...filteredHistory, { topic, payload, sent: new Date() }])
|
||||
},
|
||||
@@ -183,7 +183,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withTheme(Publish))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withTheme(Publish))
|
||||
|
||||
@@ -18,7 +18,7 @@ function PublishHistory(props: { history: Array<Message>; actions: typeof publis
|
||||
)
|
||||
|
||||
return useMemo(() => {
|
||||
const items = [...props.history].reverse().map(message => ({
|
||||
const items = [...props.history].reverse().map((message) => ({
|
||||
key: sha1(message.topic + message.payload),
|
||||
title: message.topic,
|
||||
value: message.payload || '',
|
||||
@@ -34,7 +34,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(PublishHistory)
|
||||
export default connect(undefined, mapDispatchToProps)(PublishHistory)
|
||||
|
||||
@@ -69,7 +69,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(QosSelect)
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(QosSelect)
|
||||
|
||||
@@ -41,7 +41,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(RetainSwitch)
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(RetainSwitch)
|
||||
|
||||
@@ -62,7 +62,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(TopicInput)
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(TopicInput)
|
||||
|
||||
@@ -99,9 +99,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default withStyles(styles)(
|
||||
connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(Sidebar)
|
||||
)
|
||||
export default withStyles(styles)(connect(mapStateToProps, mapDispatchToProps)(Sidebar))
|
||||
|
||||
@@ -33,9 +33,9 @@ class Topic extends React.PureComponent<Props, {}> {
|
||||
let key = 0
|
||||
const breadCrumps = node
|
||||
.branch()
|
||||
.map(node => node.sourceEdge)
|
||||
.filter(edge => Boolean(edge))
|
||||
.map(edge => [
|
||||
.map((node) => node.sourceEdge)
|
||||
.filter((edge) => Boolean(edge))
|
||||
.map((edge) => [
|
||||
<Button
|
||||
onClick={() => this.props.actions.selectTopic(edge!.target)}
|
||||
size="small"
|
||||
@@ -66,7 +66,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles, { withTheme: true })(Topic))
|
||||
export default connect(null, mapDispatchToProps)(withStyles(styles, { withTheme: true })(Topic))
|
||||
|
||||
@@ -43,7 +43,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(TopicPanel)
|
||||
export default connect(undefined, mapDispatchToProps)(TopicPanel)
|
||||
|
||||
@@ -73,7 +73,4 @@ const mapStateToProps = (state: AppState) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ActionButtons))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ActionButtons))
|
||||
|
||||
@@ -33,7 +33,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
undefined,
|
||||
mapDispatchToProps
|
||||
)(DeleteSelectedTopicButton)
|
||||
export default connect(undefined, mapDispatchToProps)(DeleteSelectedTopicButton)
|
||||
|
||||
@@ -120,9 +120,7 @@ class MessageHistory extends React.PureComponent<Props, State> {
|
||||
>
|
||||
<ShowChart style={{ marginTop: '-5px' }} />
|
||||
</CustomIconButton>
|
||||
) : (
|
||||
undefined
|
||||
)
|
||||
) : undefined
|
||||
}
|
||||
onClick={this.displayMessage}
|
||||
>
|
||||
@@ -139,7 +137,4 @@ const mapDispatchToProps = (dispatch: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
null,
|
||||
mapDispatchToProps
|
||||
)(MessageHistory)
|
||||
export default connect(null, mapDispatchToProps)(MessageHistory)
|
||||
|
||||
@@ -124,7 +124,4 @@ const styles = (theme: Theme) => ({
|
||||
},
|
||||
})
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps
|
||||
)(withStyles(styles)(ValuePanel))
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(withStyles(styles)(ValuePanel))
|
||||
|
||||
Reference in New Issue
Block a user