mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
less branching in SharedView
This commit is contained in:
@@ -46,7 +46,9 @@ export class SharedViewComponent extends React.PureComponent<
|
||||
}
|
||||
|
||||
public render() {
|
||||
if (this.state.loaded) {
|
||||
if (!this.state.loaded) {
|
||||
return <LoadingStub />;
|
||||
}
|
||||
if (this.state.error) {
|
||||
return (
|
||||
<div className="viewComponent">
|
||||
@@ -76,9 +78,6 @@ export class SharedViewComponent extends React.PureComponent<
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
return <LoadingStub />;
|
||||
}
|
||||
}
|
||||
|
||||
public async componentDidMount() {
|
||||
|
||||
Reference in New Issue
Block a user