mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-13 18:16:56 +01:00
restyled branches overview tabled, fixed en/decoded branch name
This commit is contained in:
@@ -19,19 +19,19 @@ class BranchDetailTable extends React.Component<Props> {
|
||||
<table className="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td className="has-text-weight-semibold">{t("branch.name")}</td>
|
||||
<th>{t("branch.name")}</th>
|
||||
<td>
|
||||
{branch.name} {this.renderDefaultBranch()}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="has-text-weight-semibold">
|
||||
<th>
|
||||
{t("branch.repository")}
|
||||
</td>
|
||||
</th>
|
||||
<td>{repository.name}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td className="has-text-weight-semibold">{t("branch.actions")}</td>
|
||||
<th>{t("branch.actions")}</th>
|
||||
<td>
|
||||
<BranchButtonGroup repository={repository} branch={branch} />
|
||||
</td>
|
||||
|
||||
@@ -72,7 +72,6 @@ const mapStateToProps = (state, ownProps) => {
|
||||
const { repository } = ownProps;
|
||||
const branchName = decodeURIComponent(ownProps.match.params.branch);
|
||||
const branch = getBranchByName(state, branchName);
|
||||
console.log(branchName + " Branch:",branch);
|
||||
const loading = isFetchBranchPending(state, branchName);
|
||||
const error = getFetchBranchFailure(state, branchName);
|
||||
return {
|
||||
|
||||
@@ -22,7 +22,7 @@ export const FETCH_BRANCH_FAILURE = `${FETCH_BRANCH}_${FAILURE_SUFFIX}`;
|
||||
// Fetching branches
|
||||
|
||||
export function fetchBranchByName(link: string, name: string) {
|
||||
const branchUrl = link.endsWith("/") ? link + name : link + "/" + name;
|
||||
const branchUrl = link.endsWith("/") ? link + encodeURIComponent(name) : link + "/" + encodeURIComponent(name);
|
||||
return fetchBranch(branchUrl, name);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,6 @@ export function fetchBranch(link: string, name: string) {
|
||||
}
|
||||
|
||||
export function getBranchByName(state: Object, name: string) {
|
||||
console.log("State:", state);
|
||||
if (state.branches) {
|
||||
return state.branches[name];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user