Skip to content

Commit 43f533b

Browse files
committed
feat(pathways): add copy link button to job panel
1 parent 5706d1d commit 43f533b

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

apps/registry/app/pathways/components/graph/PathwaysJobPanel.js

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {
1414
ThumbsDown,
1515
ThumbsUp,
1616
Send,
17+
Link2,
1718
} from 'lucide-react';
1819
import WhyMatch from '../WhyMatch';
1920

@@ -38,6 +39,7 @@ export function PathwaysJobPanel({
3839
const [showFullDescription, setShowFullDescription] = useState(false);
3940
const [showAllSkills, setShowAllSkills] = useState(false);
4041
const [showDropdown, setShowDropdown] = useState(false);
42+
const [copied, setCopied] = useState(false);
4143
const dropdownRef = useRef(null);
4244

4345
// Close dropdown when clicking outside
@@ -77,13 +79,31 @@ export function PathwaysJobPanel({
7779
{highlightText(jobInfo.company, filterText)}
7880
</p>
7981
</div>
80-
<button
81-
type="button"
82-
onClick={onClose}
83-
className="text-gray-400 hover:text-gray-600 p-1"
84-
>
85-
<X className="w-4 h-4" />
86-
</button>
82+
<div className="flex items-center gap-1">
83+
<button
84+
type="button"
85+
onClick={() => {
86+
navigator.clipboard.writeText(hnUrl);
87+
setCopied(true);
88+
setTimeout(() => setCopied(false), 2000);
89+
}}
90+
className="text-gray-400 hover:text-gray-600 p-1"
91+
title="Copy link"
92+
>
93+
{copied ? (
94+
<Check className="w-4 h-4 text-green-500" />
95+
) : (
96+
<Link2 className="w-4 h-4" />
97+
)}
98+
</button>
99+
<button
100+
type="button"
101+
onClick={onClose}
102+
className="text-gray-400 hover:text-gray-600 p-1"
103+
>
104+
<X className="w-4 h-4" />
105+
</button>
106+
</div>
87107
</div>
88108

89109
{/* Meta info row */}

0 commit comments

Comments
 (0)