diff --git a/apps/site/components/client/ChannelCard2.tsx b/apps/site/components/client/ChannelCard2.tsx
index f7ceffbd..a25bbec3 100644
--- a/apps/site/components/client/ChannelCard2.tsx
+++ b/apps/site/components/client/ChannelCard2.tsx
@@ -63,7 +63,7 @@ export function ChannelCard2({
/>
) : (
-
+
No items
diff --git a/apps/site/components/server/ChannelCard.tsx b/apps/site/components/server/ChannelCard.tsx
index a7d1a854..1ebb6736 100644
--- a/apps/site/components/server/ChannelCard.tsx
+++ b/apps/site/components/server/ChannelCard.tsx
@@ -32,21 +32,25 @@ export async function ChannelCard({
channel?.adds?.items ?? []
).find((item) => !item.removed)
- if (!lastNonRemovedItem) return null
+ let channelCardMetadata
- // Access the metadata of the most recent non-removed item and update with Mux processing status if it's a video
- const channelCardMetadata = await kv.get<
- Pick['value']
- >(lastNonRemovedItem?.item.uri as string)
- if (
- channelCardMetadata &&
- isVideo({ mimeType: channelCardMetadata.contentType })
- ) {
- if (muxClient) {
- const { status } = await muxClient.video.assets.retrieve(
- channelCardMetadata?.muxAssetId as string,
- )
- channelCardMetadata.muxAssetStatus = status
+ if (lastNonRemovedItem) {
+ // Retrieve metadata only if there is a non-removed item
+ channelCardMetadata = await kv.get<
+ Pick['value']
+ >(lastNonRemovedItem.item.uri as string)
+
+ // Update with Mux processing status if it's a video
+ if (
+ channelCardMetadata &&
+ isVideo({ mimeType: channelCardMetadata.contentType })
+ ) {
+ if (muxClient) {
+ const { status } = await muxClient.video.assets.retrieve(
+ channelCardMetadata.muxAssetId as string,
+ )
+ channelCardMetadata.muxAssetStatus = status
+ }
}
}
@@ -94,6 +98,20 @@ export async function ChannelCard({
width={width}
height={width}
/>
+ ) : !lastNonRemovedItem ? (
+
+
+ No items
+
+
) : (
)}
+ {/* Channel name & creator */}