From 2f4d4ac93a6de1fb183af646aecd96c9b4d75842 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Fri, 1 Mar 2019 12:57:09 -0300 Subject: [PATCH] formatting fixes --- src/routes/Publish/index.tsx | 42 ++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/routes/Publish/index.tsx b/src/routes/Publish/index.tsx index 7109a22..8e25456 100644 --- a/src/routes/Publish/index.tsx +++ b/src/routes/Publish/index.tsx @@ -122,25 +122,35 @@ class Publish extends Component<{}, PublishState> { // Setting state for all fields if (hasContent) { - this.setState(prevState => ({ - validationStatus: { - ...prevState.validationStatus, - [this.state.currentStep]: { - ...prevState.validationStatus[this.state.currentStep], - [name]: true + this.setState( + prevState => ({ + validationStatus: { + ...prevState.validationStatus, + [this.state.currentStep]: { + ...prevState.validationStatus[ + this.state.currentStep + ], + [name]: true + } } - } - }), this.runValidation) + }), + this.runValidation + ) } else { - this.setState(prevState => ({ - validationStatus: { - ...prevState.validationStatus, - [this.state.currentStep]: { - ...prevState.validationStatus[this.state.currentStep], - [name]: false + this.setState( + prevState => ({ + validationStatus: { + ...prevState.validationStatus, + [this.state.currentStep]: { + ...prevState.validationStatus[ + this.state.currentStep + ], + [name]: false + } } - } - }), this.runValidation) + }), + this.runValidation + ) } }