|
|
|
@ -3,6 +3,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; |
|
|
|
|
import React, { useContext, useEffect } from "react"; |
|
|
|
|
import { CommitSummary } from "../panels/commits/commitsummary"; |
|
|
|
|
import { ReadCommitResult } from "isomorphic-git" |
|
|
|
|
import { branch } from "../../types"; |
|
|
|
|
|
|
|
|
|
interface CommitDetailsNavigationProps { |
|
|
|
|
commit: ReadCommitResult, |
|
|
|
@ -11,10 +12,11 @@ interface CommitDetailsNavigationProps { |
|
|
|
|
activePanel: string |
|
|
|
|
callback: (eventKey: string) => void |
|
|
|
|
isAheadOfRepo: boolean |
|
|
|
|
branch: branch |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export const CommitDetailsNavigation = (props: CommitDetailsNavigationProps) => { |
|
|
|
|
const { commit, checkout, eventKey, activePanel, callback, isAheadOfRepo } = props; |
|
|
|
|
const { commit, checkout, eventKey, activePanel, callback, isAheadOfRepo, branch } = props; |
|
|
|
|
const handleClick = () => { |
|
|
|
|
if (!callback) return |
|
|
|
|
if (activePanel === eventKey) { |
|
|
|
@ -30,7 +32,7 @@ export const CommitDetailsNavigation = (props: CommitDetailsNavigationProps) => |
|
|
|
|
activePanel === eventKey ? <FontAwesomeIcon className='' icon={faCaretDown}></FontAwesomeIcon> : <FontAwesomeIcon className='' icon={faCaretRight}></FontAwesomeIcon> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
<CommitSummary isAheadOfRepo={isAheadOfRepo} commit={commit} checkout={checkout}></CommitSummary> |
|
|
|
|
<CommitSummary branch={branch} isAheadOfRepo={isAheadOfRepo} commit={commit} checkout={checkout}></CommitSummary> |
|
|
|
|
</div> |
|
|
|
|
</> |
|
|
|
|
); |
|
|
|
|