MCPcopy Create free account
hub / github.com/Snapchat/dagger-browser / CodeLink

Function CodeLink

browser/src/components/CodeLink.tsx:8–24  ·  view source on GitHub ↗
({ link }: Props)

Source from the content-addressed store, hash-verified

6}
7
8const CodeLink = ({ link }: Props) => {
9 if (Config.REPO_URL) {
10 let filename = link.split(".").pop();
11 return (
12 <a
13 rel="noopener noreferrer"
14 target="_blank"
15 href={Config.REPO_URL + "/search?q=filename:" + filename}
16 className="unselectable"
17 >
18 <i className="tiny material-icons">open_in_new</i>
19 </a>
20 );
21 } else {
22 return <span></span>;
23 }
24};
25
26export default CodeLink;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected