diff --git a/scm-ui/src/repos/branches/containers/BranchRoot.js b/scm-ui/src/repos/branches/containers/BranchRoot.js index 22b7011968..f1570735e2 100644 --- a/scm-ui/src/repos/branches/containers/BranchRoot.js +++ b/scm-ui/src/repos/branches/containers/BranchRoot.js @@ -12,7 +12,6 @@ import { isFetchBranchPending } from "../modules/branches"; import { ErrorPage, Loading } from "@scm-manager/ui-components"; -import CreateBranch from "./CreateBranch"; import type { History } from "history"; type Props = { @@ -26,6 +25,7 @@ type Props = { t: string => string, history: History, match: any, + location: any, // dispatch functions fetchBranch: (repository: Repository, branchName: string) => void @@ -50,9 +50,23 @@ class BranchRoot extends React.Component { }; render() { - const { repository, branch, loading, error, t } = this.props; + const { + repository, + branch, + loading, + error, + t, + match, + location + } = this.props; + + const url = this.matchedUrl(); if (error) { + if(location.search.indexOf("?create=true") > -1) { + return ; + } + return ( { return ; } - const url = this.matchedUrl(); - return ( - ( - - )} - /> } + component={() => ( + + )} /> );