add redirects for old routes

This commit is contained in:
Eduard Heimbuch
2020-01-08 15:17:07 +01:00
parent a43ffacf03
commit b8d4bb6904
4 changed files with 13 additions and 7 deletions

View File

@@ -136,8 +136,8 @@ const mapStateToProps = (state: any, ownProps: Props) => {
const loading = isFetchBranchesPending(state, repository);
const branches = getBranches(state, repository);
const selectedView = decodeURIComponent(location.pathname.split("/")[5]);
const selectedBranch = decodeURIComponent(location.pathname.split("/")[6]);
const branchFromURL = decodeURIComponent(location.pathname.split("/")[6]);
const selectedBranch = branchFromURL && branchFromURL !== "undefined" ? branchFromURL : "";
return {
error,
loading,