Skip to content

Commit 2169b42

Browse files
authored
only render share button for owners (#1157)
1 parent 696a695 commit 2169b42

File tree

1 file changed

+11
-9
lines changed
  • apps/web/app/(org)/dashboard/caps/components/CapCard

1 file changed

+11
-9
lines changed

apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -349,15 +349,17 @@ export const CapCard = ({
349349
"top-2 right-2 flex-col gap-2 z-[51]",
350350
)}
351351
>
352-
<CapCardButton
353-
tooltipContent="Share"
354-
onClick={(e) => {
355-
e.stopPropagation();
356-
setIsSharingDialogOpen(true);
357-
}}
358-
className="delay-0"
359-
icon={<FontAwesomeIcon icon={faShare} />}
360-
/>
352+
{isOwner && (
353+
<CapCardButton
354+
tooltipContent="Share"
355+
onClick={(e) => {
356+
e.stopPropagation();
357+
setIsSharingDialogOpen(true);
358+
}}
359+
className="delay-0"
360+
icon={<FontAwesomeIcon icon={faShare} />}
361+
/>
362+
)}
361363

362364
<CapCardButton
363365
tooltipContent="Download Cap"

0 commit comments

Comments
 (0)