1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 19:29:56 +00:00

Repo optimized (#2664)

This commit is contained in:
杨顺强
2018-12-18 17:21:01 +08:00
committed by Daniel Pan
parent 3b43d2d534
commit ed5439a4e3
15 changed files with 83 additions and 78 deletions

View File

@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import RepoListItem from './repo-list-item';
const propTypes = {
repo: PropTypes.object,
currentRepoInfo: PropTypes.object,
repoList: PropTypes.array,
selectedRepo: PropTypes.object,
initToShowChildren: PropTypes.bool.isRequired,
@@ -15,10 +15,10 @@ const propTypes = {
class RepoListView extends React.Component {
render() {
let { repo, repoList } = this.props;
if (repo) {
let { currentRepoInfo, repoList } = this.props;
if (currentRepoInfo) {
repoList = [];
repoList.push(repo);
repoList.push(currentRepoInfo);
}
return (
<ul className="list-view-content file-chooser-item">