mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 09:21:54 +00:00
Optimized wiki code (#2566)
* optimized path component * abstract component * repair copy bug * move copy&move&download to list-item * add modal portal
This commit is contained in:
30
frontend/src/components/cur-dir-path/index.js
Normal file
30
frontend/src/components/cur-dir-path/index.js
Normal file
@@ -0,0 +1,30 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import DirPath from './dir-path';
|
||||
import DirTool from './dir-tool';
|
||||
|
||||
const propTypes = {
|
||||
repoName: PropTypes.string.isRequired,
|
||||
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}
|
||||
/>
|
||||
<DirTool currentPath={this.props.currentPath} />
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
CurDirPath.propTypes = propTypes;
|
||||
|
||||
export default CurDirPath;
|
Reference in New Issue
Block a user