Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

only render share button for owners (#1157)

Ameer Al Ashhab2169b42041a5
diff --git a/apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx b/apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx
index a90727280..c5ac6d40f 100644
--- a/apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx
+++ b/apps/web/app/(org)/dashboard/caps/components/CapCard/CapCard.tsx
@@ -349,15 +349,17 @@ export const CapCard = ({
"top-2 right-2 flex-col gap-2 z-[51]",
)}
>
- <CapCardButton
- tooltipContent="Share"
- onClick={(e) => {
- e.stopPropagation();
- setIsSharingDialogOpen(true);
- }}
- className="delay-0"
- icon={<FontAwesomeIcon icon={faShare} />}
- />
+ {isOwner && (
+ <CapCardButton
+ tooltipContent="Share"
+ onClick={(e) => {
+ e.stopPropagation();
+ setIsSharingDialogOpen(true);
+ }}
+ className="delay-0"
+ icon={<FontAwesomeIcon icon={faShare} />}
+ />
+ )}
<CapCardButton
tooltipContent="Download Cap"