1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-05 08:53:14 +00:00

improve code (#4370)

* improve code

* optimized code
This commit is contained in:
杨顺强
2019-12-19 13:44:30 +08:00
committed by Daniel Pan
parent 9c10cbf9f7
commit 4e584c8f65
7 changed files with 18 additions and 38 deletions

View File

@@ -96,7 +96,7 @@ class GroupView extends React.Component {
}).catch((error) => {
this.setState({
isLoading: false,
errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403
errMessage: Utils.getErrorMsg(error, true) // true: show login tip if 403
});
});
}
@@ -115,7 +115,7 @@ class GroupView extends React.Component {
}).catch((error) => {
this.setState({
isLoading: false,
errorMsg: Utils.getErrorMsg(error, true) // true: show login tip if 403
errMessage: Utils.getErrorMsg(error, true) // true: show login tip if 403
});
});
}
@@ -507,7 +507,7 @@ class GroupView extends React.Component {
</div>
<div className="cur-view-content">
{this.state.isLoading && <Loading />}
{(!this.state.isLoading && errMessage) && errMessage}
{(!this.state.isLoading && errMessage) && <div className="error text-center mt-2">{errMessage}</div>}
{(!this.state.isLoading && this.state.repoList.length === 0) && emptyTip}
{(!this.state.isLoading && this.state.repoList.length > 0) &&
<SharedRepoListView