2018-11-27 14:47:19 +08:00
|
|
|
import React, { Fragment } from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
import DirPath from './dir-path';
|
|
|
|
import DirTool from './dir-tool';
|
|
|
|
|
|
|
|
const propTypes = {
|
2018-11-28 12:41:49 +08:00
|
|
|
repoID: PropTypes.string.isRequired,
|
2018-11-27 14:47:19 +08:00
|
|
|
repoName: PropTypes.string.isRequired,
|
2018-11-28 12:41:49 +08:00
|
|
|
permission: PropTypes.bool.isRequired,
|
2018-11-27 14:47:19 +08:00
|
|
|
currentPath: PropTypes.string.isRequired,
|
|
|
|
onPathClick: PropTypes.func.isRequired,
|
|
|
|
};
|
|
|
|
|
|
|
|
class CurDirPath extends React.Component {
|
|
|
|
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Fragment>
|
|
|
|
<DirPath
|
|
|
|
repoName={this.props.repoName}
|
|
|
|
currentPath={this.props.currentPath}
|
|
|
|
onPathClick={this.props.onPathClick}
|
|
|
|
/>
|
2018-11-28 12:41:49 +08:00
|
|
|
<DirTool
|
|
|
|
repoID={this.props.repoID}
|
|
|
|
repoName={this.props.repoName}
|
|
|
|
permission={this.props.permission}
|
|
|
|
currentPath={this.props.currentPath}
|
|
|
|
/>
|
2018-11-27 14:47:19 +08:00
|
|
|
</Fragment>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CurDirPath.propTypes = propTypes;
|
|
|
|
|
|
|
|
export default CurDirPath;
|