Skip to content

Commit

Permalink
Simplified state change functions
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHaimes committed Jun 28, 2021
1 parent 441637c commit f2103a8
Showing 1 changed file with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ export class FindAndReplace extends React.Component<
<Button
color="primary"
onClick={() => {
this.setState(() => ({
warningDialogOpen: true,
}));
this.setState({ warningDialogOpen: true });
}}
>
{this.props.translate("charInventory.characterSet.apply")}
Expand All @@ -90,14 +88,10 @@ export class FindAndReplace extends React.Component<
dialogFindValue={this.state.findValue}
dialogReplaceValue={this.state.replaceValue}
handleCancel={() => {
this.setState(() => ({
warningDialogOpen: false,
}));
this.setState({ warningDialogOpen: false });
}}
handleAccept={() => {
this.setState(() => ({
warningDialogOpen: false,
}));
this.setState({ warningDialogOpen: false });
this.props.findAndReplace(
this.state.findValue,
this.state.replaceValue
Expand Down

0 comments on commit f2103a8

Please sign in to comment.