Reset store after disconnect

This commit is contained in:
Thomas Nordquist
2019-04-15 14:14:43 +02:00
parent 6d6b35d5f8
commit 47d1e74852
9 changed files with 63 additions and 39 deletions

View File

@@ -84,8 +84,8 @@ class PauseButton extends React.Component<Props, {changes: number}> {
const mapStateToProps = (state: AppState) => {
return {
paused: state.tree.paused,
tree: state.tree.tree,
paused: state.tree.get('paused'),
tree: state.tree.get('tree'),
}
}

View File

@@ -185,7 +185,7 @@ class Sidebar extends React.Component<Props, State> {
const mapStateToProps = (state: AppState) => {
return {
node: state.tree.selectedTopic,
node: state.tree.get('selectedTopic'),
}
}

View File

@@ -180,7 +180,7 @@ const mapDispatchToProps = (dispatch: any) => {
const mapStateToProps = (state: AppState) => {
return {
valueRendererDisplayMode: state.settings.get('valueRendererDisplayMode'),
node: state.tree.selectedTopic,
node: state.tree.get('selectedTopic'),
}
}

View File

@@ -123,9 +123,9 @@ class Tree extends React.PureComponent<Props, State> {
const mapStateToProps = (state: AppState) => {
return {
tree: state.tree.tree,
paused: state.tree.paused,
filter: state.tree.filter,
tree: state.tree.get('tree'),
paused: state.tree.get('paused'),
filter: state.tree.get('filter'),
host: state.connection.host,
settings: state.settings,
}