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

optimized code

This commit is contained in:
shanshuirenjia
2018-12-12 08:40:10 +08:00
parent 3843eabfab
commit 79cb8ebe66

View File

@@ -44,11 +44,10 @@ class DirPath extends React.Component {
render() { render() {
let { currentPath, repoName } = this.props; let { currentPath, repoName } = this.props;
let pathElem = this.turnPathToLink(currentPath); let pathElem = this.turnPathToLink(currentPath);
let pathPrefix = this.props.pathPrefix !== undefined ? this.props.pathPrefix : false;
return ( return (
<div className="path-containter"> <div className="path-containter">
{pathPrefix ? {this.props.pathPrefix ?
pathPrefix : this.props.pathPrefix :
<Fragment> <Fragment>
<a href={siteRoot + 'my-libs/'} className="normal">{gettext('Libraries')}</a> <a href={siteRoot + 'my-libs/'} className="normal">{gettext('Libraries')}</a>
<span className="path-split">/</span> <span className="path-split">/</span>