diff --git a/app/src/components/Sidebar/History.tsx b/app/src/components/Sidebar/History.tsx index e96e077..19201a7 100644 --- a/app/src/components/Sidebar/History.tsx +++ b/app/src/components/Sidebar/History.tsx @@ -47,13 +47,22 @@ class MessageHistory extends React.Component { )) + const visible = this.props.items.length > 0 && this.state.collapsed + return (
- {this.state.collapsed ? '▶' : '▼'} History + + {this.state.collapsed ? '▶' : '▼'} History +
{this.state.collapsed ? null : elements} @@ -63,17 +72,12 @@ class MessageHistory extends React.Component { } public render() { - const visible = this.props.items.length > 0 && this.state.collapsed return ( - {this.renderHistory()} - +
) } @@ -83,7 +87,7 @@ class MessageHistory extends React.Component { } const styles = (theme: Theme) => ({ - badge: { top: '-8px', left:'64px' }, + badge: { right:'-25px' }, }) export default withStyles(styles)(MessageHistory) diff --git a/backend/src/DataSource/MqttSource.ts b/backend/src/DataSource/MqttSource.ts index f0380c6..8106e3e 100644 --- a/backend/src/DataSource/MqttSource.ts +++ b/backend/src/DataSource/MqttSource.ts @@ -65,7 +65,7 @@ export class MqttSource implements DataSource { }) }) - client.on('message', (topic, message) => { + client.on('message', (topic, message, packet) => { this.messageCallback && this.messageCallback(topic, message) })