From 3f3b8c4e8f082d04e0f264ae68cd69dfd93f81ac Mon Sep 17 00:00:00 2001 From: 0xTranqui Date: Tue, 30 Apr 2024 22:52:11 -0400 Subject: [PATCH] couple fixes --- apps/site/app/(base)/layout.tsx | 2 +- apps/site/app/(base)/page.tsx | 4 ++-- apps/site/app/channel/[id]/page.tsx | 2 +- apps/site/app/directory/page.tsx | 2 +- apps/site/components/server/MarqueeWrapper.tsx | 6 +++++- apps/site/lib/username/getUsername.ts | 2 +- 6 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/site/app/(base)/layout.tsx b/apps/site/app/(base)/layout.tsx index 5596eda7c..2a1facab6 100644 --- a/apps/site/app/(base)/layout.tsx +++ b/apps/site/app/(base)/layout.tsx @@ -11,7 +11,7 @@ export default function BaseLayout({ return (
- {/* */} +
diff --git a/apps/site/app/(base)/page.tsx b/apps/site/app/(base)/page.tsx index 287035c76..b68cea0bf 100644 --- a/apps/site/app/(base)/page.tsx +++ b/apps/site/app/(base)/page.tsx @@ -18,7 +18,7 @@ export default async function Home({ return ( <> - {/* {adds.items.slice(0, 60).map((add, index) => + {adds.items.slice(0, 60).map((add, index) => add.removed ? null : ( ), - )} */} + )} {/* @ts-ignore */} diff --git a/apps/site/app/channel/[id]/page.tsx b/apps/site/app/channel/[id]/page.tsx index 65c745e34..5d73451df 100644 --- a/apps/site/app/channel/[id]/page.tsx +++ b/apps/site/app/channel/[id]/page.tsx @@ -31,7 +31,7 @@ export default async function Channel({ return (
- {/* */} +
diff --git a/apps/site/app/directory/page.tsx b/apps/site/app/directory/page.tsx index 16084f481..774fc8e03 100644 --- a/apps/site/app/directory/page.tsx +++ b/apps/site/app/directory/page.tsx @@ -40,7 +40,7 @@ export default async function Directory({ return (
- {/* */} +
diff --git a/apps/site/components/server/MarqueeWrapper.tsx b/apps/site/components/server/MarqueeWrapper.tsx index 7fcb6a594..839e1142d 100644 --- a/apps/site/components/server/MarqueeWrapper.tsx +++ b/apps/site/components/server/MarqueeWrapper.tsx @@ -14,6 +14,8 @@ export async function MarqueeWrapper() { let marqueeActions: Action[] = [] const { data } = await getMarqueeData() + console.log("is getalldata working: ", data) + if (data) { // fetch usernames for adds const usernames = await Promise.all( @@ -23,6 +25,8 @@ export async function MarqueeWrapper() { }), ), ) + + console.log("is get usernames working ", usernames) // fetch metadata for items // @ts-ignore const { metadata } = await getAddsMetadata(data) @@ -32,7 +36,7 @@ export async function MarqueeWrapper() { const itemMetadata = metadata.data[add.item.uri] return { userName: usernames[index], - itemName: itemMetadata.name, + itemName: itemMetadata.name ? itemMetadata.name : '-', channelName: data[index].channel.name, channelId: data[index].channel.id, channelIndex: data[index].channelIndex, diff --git a/apps/site/lib/username/getUsername.ts b/apps/site/lib/username/getUsername.ts index 80992bf9c..0caee10a9 100644 --- a/apps/site/lib/username/getUsername.ts +++ b/apps/site/lib/username/getUsername.ts @@ -10,7 +10,7 @@ export async function getUsername({ id }: { id: bigint }) { headers: { 'Content-Type': 'application/json', }, - body: JSON.stringify({ id: idString.toString() }), + body: JSON.stringify({ id: idString }), }, )