Fix styling and toggle off issues

This commit is contained in:
Chi Vinh Le
2018-03-05 20:53:01 +01:00
parent 77274be2e4
commit aa754657a2
2 changed files with 9 additions and 8 deletions
@@ -15,13 +15,15 @@ class SettingsContainer extends React.Component {
};
indicateOn = plugin =>
this.setState({
hasNotifications: this.state.hasNotifications.concat(plugin),
});
this.setState(state => ({
hasNotifications: state.hasNotifications.concat(plugin),
}));
indicateOff = plugin =>
this.setState({
hasNotifications: this.state.hasNotifications.filter(i => i !== plugin),
});
this.setState(state => ({
hasNotifications: state.hasNotifications.filter(i => i !== plugin),
}));
setTurnOffInputFragment = fragment =>
this.setState(state => ({
turnOffInput: { ...state.turnOffInput, ...fragment },