Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kongtiaowang committed Sep 25, 2024
1 parent 859d708 commit 8bccc70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/acknowledgements/jsx/acknowledgementsIndex.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class AcknowledgementsIndex extends Component {
this.state = {
data: {},
formData: {},
submitting: false, // track if form is being submitted
submitting: false, // track if form is being submitted
error: false,
isLoaded: false,
affiliationsOptions: {
Expand Down Expand Up @@ -148,11 +148,11 @@ class AcknowledgementsIndex extends Component {
*/
handleSubmit(e) {
e.preventDefault(); // prevent default form submission
const { formData, submitting } = this.state;
const {formData, submitting} = this.state;

if (submitting) return; // prevent multiple submits

this.setState({ submitting: true }); // set submitting to true
this.setState({submitting: true}); // set submitting to true

let formObject = new FormData();
for (let key in formData) {
Expand Down Expand Up @@ -188,7 +188,7 @@ class AcknowledgementsIndex extends Component {
console.error(error);
})
.finally(() => {
this.setState({ submitting: false }); // reset submitting state
this.setState({submitting: false}); // reset submitting state
});
}

Expand Down

0 comments on commit 8bccc70

Please sign in to comment.