1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 23:20:51 +00:00

Optimized module code (#2574)

This commit is contained in:
杨顺强
2018-11-28 12:41:49 +08:00
committed by Daniel Pan
parent 330407be0b
commit 09f32f2312
21 changed files with 120 additions and 38 deletions

View File

@@ -2,12 +2,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import RepoListView from './repo-list-view';
import { seafileAPI } from '../../utils/seafile-api';
import { gettext, repoID } from '../../utils/constants';
import { gettext } from '../../utils/constants';
import Repo from '../../models/repo';
import '../../css/file-chooser.css';
const propTypes = {
repoID: PropTypes.string.isRequired,
onDirentItemClick: PropTypes.func,
onRepoItemClick: PropTypes.func,
};
@@ -28,6 +29,7 @@ class FileChooser extends React.Component {
}
componentDidMount() {
let repoID = this.props.repoID;
seafileAPI.getRepoInfo(repoID).then(res => {
let repo = new Repo(res.data);
this.setState({