Skip to content

Commit

Permalink
Fix - merge direction #955 (#968)
Browse files Browse the repository at this point in the history
* added left arrow

* fixed merge direction
  • Loading branch information
shamikakumar committed Nov 30, 2020
1 parent dc69cc4 commit 9623170
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions webui/src/components/ComparePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {useEffect, useState, useCallback} from "react";
import {useHistory, useLocation} from "react-router-dom";
import {connect} from "react-redux";
import {Alert, ButtonToolbar, Button, OverlayTrigger, Tooltip} from "react-bootstrap";
import {SyncIcon, GitMergeIcon} from "@primer/octicons-react";
import {SyncIcon, GitMergeIcon, ArrowLeftIcon} from "@primer/octicons-react";
import {diff, diffPaginate, merge, resetMerge} from "../actions/refs";
import RefDropdown from "./RefDropdown";
import Changes from "./Changes";
Expand All @@ -21,8 +21,8 @@ const MergeButton = connect(
}

const diffItems = diffResults.payload ? diffResults.payload.results : [];
const destinationBranchId = compare.id;
const sourceBranchId = refId.id;
const destinationBranchId = refId.id;
const sourceBranchId = compare.id;
let mergeDisabled = true;
let mergeVariant = 'light';
let mergeText;
Expand Down Expand Up @@ -91,6 +91,7 @@ const CompareToolbar = ({repo, refId, compare, refresh}) => {
<RefDropdown
repo={repo}
selected={refId}
prefix={'Base '}
withWorkspace={false}
selectRef={(ref) => {
const params = new URLSearchParams(location.search);
Expand All @@ -106,7 +107,7 @@ const CompareToolbar = ({repo, refId, compare, refresh}) => {
params.delete('compareBranch');
history.push({...location, search: params.toString()})
}}/>

<ArrowLeftIcon className="mr-2 mt-2"/>
<RefDropdown
repo={repo}
selected={compare}
Expand Down Expand Up @@ -144,7 +145,7 @@ const CompareToolbar = ({repo, refId, compare, refresh}) => {
const ComparePage = ({repo, refId, compareRef, diff, diffPaginate, diffResults, resetMerge, mergeResults }) => {
const refreshData = useCallback(() => {
if (compareRef) {
diff(repo.id, refId.id, compareRef.id);
diff(repo.id, compareRef.id, refId.id);
}
}, [repo.id, refId.id, diff, compareRef]);

Expand Down

0 comments on commit 9623170

Please sign in to comment.