Skip to content

Commit 95de6e5

Browse files
committed
make codeLink optional for the toolkit info
1 parent a94a557 commit 95de6e5

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

src/components/ToolInfo.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import styles from "./ToolInfo.module.css";
44
interface ToolInfoProps {
55
description: string;
66
author: string;
7-
codeLink: string;
7+
codeLink?: string;
88
authType: "oauth2";
99
authProviderName?: string;
1010
authProviderDocsUrl?: string;
@@ -33,12 +33,14 @@ const ToolInfo: React.FC<ToolInfoProps> = ({
3333
<p>
3434
<strong>Author: </strong> {author}
3535
</p>
36-
<p>
37-
<strong>Code: </strong>
38-
<a href={codeLink} target="_blank" rel="noopener noreferrer">
39-
GitHub
40-
</a>
41-
</p>
36+
{codeLink && (
37+
<p>
38+
<strong>Code: </strong>
39+
<a href={codeLink} target="_blank" rel="noopener noreferrer">
40+
GitHub
41+
</a>
42+
</p>
43+
)}
4244
<p>
4345
<strong>Auth: </strong>
4446
{authType.toLowerCase() === "oauth2" ? (

0 commit comments

Comments
 (0)