Skip to content

Commit fa69311

Browse files
authored
Add copy button back (#7811)
Fixes #7781
1 parent a3c8b70 commit fa69311

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

webviews/components/header.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { CodingAgentContext, OverviewContext, PullRequest } from '../../src/gith
1111
import PullRequestContext from '../common/context';
1212
import { useStateProp } from '../common/hooks';
1313
import { ContextDropdown } from './contextDropdown';
14-
import { copilotErrorIcon, copilotInProgressIcon, copilotSuccessIcon, editIcon, issueClosedIcon, issueIcon, loadingIcon, mergeIcon, prClosedIcon, prDraftIcon, prOpenIcon } from './icon';
14+
import { copilotErrorIcon, copilotInProgressIcon, copilotSuccessIcon, copyIcon, editIcon, issueClosedIcon, issueIcon, loadingIcon, mergeIcon, prClosedIcon, prDraftIcon, prOpenIcon } from './icon';
1515
import { AuthorLink, Avatar } from './user';
1616

1717
export function Header({
@@ -70,7 +70,7 @@ export function Header({
7070
}
7171

7272
function Title({ title, titleHTML, number, url, inEditMode, setEditMode, setCurrentTitle, canEdit, owner, repo }) {
73-
const { setTitle } = useContext(PullRequestContext);
73+
const { setTitle, copyPrLink } = useContext(PullRequestContext);
7474

7575
const titleForm = (
7676
<form
@@ -118,6 +118,9 @@ function Title({ title, titleHTML, number, url, inEditMode, setEditMode, setCurr
118118
{editIcon}
119119
</button>
120120
: null}
121+
<button title="Copy Link" onClick={copyPrLink} className="icon-button" aria-label="Copy Pull Request Link">
122+
{copyIcon}
123+
</button>
121124
</div>
122125
);
123126

0 commit comments

Comments
 (0)