Skip to content

Commit 6af12d7

Browse files
committed
Update ShareHeader.tsx
1 parent 313669b commit 6af12d7

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

apps/web/app/s/[videoId]/_components/ShareHeader.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ export const ShareHeader = ({
129129
}
130130
};
131131

132-
const isVideoOwnerPro =
133-
user !== null && data.ownerId === user.id && userIsPro(user);
132+
const isVideoOwnerPro = user && data.ownerId === user.id && userIsPro(user);
134133

135134
const handleSharingUpdated = () => {
136135
refresh();
@@ -182,7 +181,7 @@ export const ShareHeader = ({
182181

183182
return (
184183
<>
185-
{!isVideoOwnerPro && (
184+
{user !== null && !isVideoOwnerPro && (
186185
<div className="flex sticky flex-col sm:flex-row inset-x-0 top-0 z-10 gap-4 justify-center items-center px-3 py-2 mx-auto w-[calc(100%-20px)] max-w-fit rounded-b-xl border bg-gray-4 border-gray-6">
187186
<p className="text-center text-gray-12">
188187
Shareable links are limited to 5 mins on the free plan.
@@ -292,7 +291,7 @@ export const ShareHeader = ({
292291
</button>
293292
)}
294293
</div>
295-
{!user === null && (
294+
{user !== null && (
296295
<div className="hidden md:flex">
297296
<Button
298297
onClick={() => {

0 commit comments

Comments
 (0)