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

@ -55,7 +55,7 @@ export default abstract class AudioPlayerBase<T extends IProps = IProps> extends
// Don't wait for the promise to complete - it will emit a progress update when it
// is done, and it's not meant to take long anyhow.
this.props.playback.prepare().catch(e => {
this.props.playback.prepare().catch((e) => {
logger.error("Error processing audio file:", e);
this.setState({ error: true });
});
@ -95,9 +95,11 @@ export default abstract class AudioPlayerBase<T extends IProps = IProps> extends
protected abstract renderComponent(): ReactNode;
public render(): ReactNode {
return <>
{ this.renderComponent() }
{ this.state.error && <div className="text-warning">{ _t("Error downloading audio") }</div> }
</>;
return (
<>
{this.renderComponent()}
{this.state.error && <div className="text-warning">{_t("Error downloading audio")}</div>}
</>
);
}
}