Update prettier

This commit is contained in:
Thomas Nordquist
2020-04-15 23:54:30 +02:00
parent fbfbe94d19
commit 237c718a0a
76 changed files with 130 additions and 257 deletions

View File

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

View File

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

View File

@@ -69,7 +69,4 @@ const mapStateToProps = (state: AppState) => {
}
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(QosSelect)
export default connect(mapStateToProps, mapDispatchToProps)(QosSelect)

View File

@@ -41,7 +41,4 @@ const mapStateToProps = (state: AppState) => {
}
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(RetainSwitch)
export default connect(mapStateToProps, mapDispatchToProps)(RetainSwitch)

View File

@@ -62,7 +62,4 @@ const mapStateToProps = (state: AppState) => {
}
}
export default connect(
mapStateToProps,
mapDispatchToProps
)(TopicInput)
export default connect(mapStateToProps, mapDispatchToProps)(TopicInput)