1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +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() {
let { currentPath, repoName } = this.props;
let pathElem = this.turnPathToLink(currentPath);
let pathPrefix = this.props.pathPrefix !== undefined ? this.props.pathPrefix : false;
return (
<div className="path-containter">
{pathPrefix ?
pathPrefix :
{this.props.pathPrefix ?
this.props.pathPrefix :
<Fragment>
<a href={siteRoot + 'my-libs/'} className="normal">{gettext('Libraries')}</a>
<span className="path-split">/</span>