Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

Update ShareHeader.tsx (#1260)

Ameer Al Ashhab38d1d7ba858c
diff --git a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
index 490e22e11..a80df1fa8 100644
--- a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
+++ b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
@@ -32,6 +32,7 @@ export const ShareHeader = ({
data: typeof videos.$inferSelect & {
ownerName?: string | null;
ownerImage?: string | null;
+ ownerIsPro?: boolean;
};
user: typeof userSelectProps | null;
customDomain?: string | null;
@@ -63,7 +64,7 @@ export const ShareHeader = ({
const contextSharedSpaces = contextData?.sharedSpaces || null;
const effectiveSharedSpaces = contextSharedSpaces || sharedSpaces;
- const isOwner = user && user.id.toString() === data.ownerId;
+ const isOwner = user && user.id === data.ownerId;
const { webUrl } = usePublicEnv();
@@ -130,7 +131,7 @@ export const ShareHeader = ({
}
};
- const isVideoOwnerPro: boolean = user && isOwner ? userIsPro(user) : false;
+ const isVideoOwnerPro: boolean = data.ownerIsPro ?? false;
const handleSharingUpdated = () => {
refresh();