mirror of
https://github.com/usatiuk/writer.git
synced 2025-10-29 00:17:48 +01:00
remove fetching docs in render in DocumentView
This commit is contained in:
@@ -47,12 +47,21 @@ export class DocumentViewComponent extends React.PureComponent<
|
||||
</div>
|
||||
);
|
||||
} else {
|
||||
if (!this.props.allDocs && !this.props.fetching) {
|
||||
this.props.fetchDocs();
|
||||
}
|
||||
return this.props.spinner && <LoadingStub />;
|
||||
}
|
||||
}
|
||||
|
||||
public componentDidUpdate() {
|
||||
if (!this.props.allDocs && !this.props.fetching) {
|
||||
this.props.fetchDocs();
|
||||
}
|
||||
}
|
||||
|
||||
public componentDidMount() {
|
||||
if (!this.props.allDocs && !this.props.fetching) {
|
||||
this.props.fetchDocs();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function mapStateToProps(state: IAppState) {
|
||||
|
||||
Reference in New Issue
Block a user