Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React from 'react';
import React from "react";
import Spinner from "./Spinner";
import EditableText from "./EditableText";
@ -61,7 +61,9 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
initialValue: "",
placeholder: "",
blurToSubmit: false,
onSubmit: () => { return Promise.resolve(); },
onSubmit: () => {
return Promise.resolve();
},
};
constructor(props: IProps) {
@ -111,14 +113,18 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
this.props.onSubmit(value).then(
() => {
if (this.unmounted) { return; }
if (this.unmounted) {
return;
}
this.setState({
busy: false,
value: value,
});
},
(error) => {
if (this.unmounted) { return; }
if (this.unmounted) {
return;
}
this.setState({
errorString: error.toString(),
busy: false,
@ -129,16 +135,13 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
public render(): JSX.Element {
if (this.state.busy) {
return (
<Spinner />
);
return <Spinner />;
} else if (this.state.errorString) {
return (
<div className="error">{ this.state.errorString }</div>
);
return <div className="error">{this.state.errorString}</div>;
} else {
return (
<EditableText initialValue={this.state.value}
<EditableText
initialValue={this.state.value}
placeholder={this.props.placeholder}
onValueChanged={this.onValueChanged}
blurToSubmit={this.props.blurToSubmit}
@ -147,4 +150,3 @@ export default class EditableTextContainer extends React.Component<IProps, IStat
}
}
}