do not render branch selector for svn

This commit is contained in:
Sebastian Sdorra
2018-10-17 14:18:54 +02:00
parent 1888a58cb0
commit dccca5ae2c

View File

@@ -85,16 +85,26 @@ class BranchRoot extends React.Component<Props> {
return (
<>
{this.renderBranchSelector()}
<Route path={`${url}/:page?`} component={() => changesets} />
</>
);
}
renderBranchSelector = () => {
const { repository, branches } = this.props;
if (repository._links.branches) {
return (
<BranchSelector
branches={branches}
selected={(b: Branch) => {
this.branchSelected(b);
}}
/>
<Route path={`${url}/:page?`} component={() => changesets} />
</>
);
}
);
}
return null;
};
}
const mapDispatchToProps = dispatch => {