Skip to content

Commit b6d21f5

Browse files
authored
web: fix displaying name of video creator + pro status (#1315)
* Update ShareHeader.tsx * fix isOwnerPro value
1 parent 875a6a3 commit b6d21f5

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

apps/web/app/s/[videoId]/Share.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"use client";
22

3-
import type { userSelectProps } from "@cap/database/auth/session";
4-
import type { comments as commentsSchema, videos } from "@cap/database/schema";
3+
import type { comments as commentsSchema } from "@cap/database/schema";
54
import type { ImageUpload, Video } from "@cap/web-domain";
65
import { useQuery } from "@tanstack/react-query";
76
import {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export const ShareHeader = ({
242242
/>
243243
)}
244244
<div className="flex flex-col text-left">
245-
<p className="text-sm text-gray-12">{data.name}</p>
245+
<p className="text-sm text-gray-12">{data.owner.name}</p>
246246
<p className="text-xs text-gray-10">
247247
{moment(data.createdAt).fromNow()}
248248
</p>

apps/web/app/s/[videoId]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,17 +720,19 @@ async function AuthorizedContent({
720720

721721
const videoWithOrganizationInfo = await Effect.gen(function* () {
722722
const imageUploads = yield* ImageUploads;
723+
const ownerIsPro = userIsPro(video.owner);
723724

724725
return {
725726
...video,
726727
owner: {
727728
id: video.owner.id,
728729
name: video.owner.name,
729-
isPro: userIsPro(video.owner),
730+
isPro: ownerIsPro,
730731
image: video.ownerImageUrlOrKey
731732
? yield* imageUploads.resolveImageUrl(video.ownerImageUrlOrKey)
732733
: null,
733734
},
735+
ownerIsPro,
734736
organization: {
735737
organizationMembers: membersList.map((member) => member.userId),
736738
organizationId: video.sharedOrganization?.organizationId ?? undefined,

0 commit comments

Comments
 (0)