Skip to content

Commit

Permalink
couple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTranqui committed May 1, 2024
1 parent 273080a commit 3f3b8c4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/site/app/(base)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function BaseLayout({
return (
<section>
<div className="fixed top-[var(--header-height)] z-50 w-full">
{/* <MarqueeWrapper /> */}
<MarqueeWrapper />
</div>
<Flex className="px-5 pt-[104px]">
<div className="hidden md:w-[19%] md:block">
Expand Down
4 changes: 2 additions & 2 deletions apps/site/app/(base)/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default async function Home({
return (
<>
<Grid className="grid-cols-2 md:grid-cols-[repeat(auto-fill,_minmax(255px,_1fr))] gap-5">
{/* {adds.items.slice(0, 60).map((add, index) =>
{adds.items.slice(0, 60).map((add, index) =>
add.removed ? null : (
<ItemCard
key={index}
Expand All @@ -37,7 +37,7 @@ export default async function Home({
}
/>
),
)} */}
)}
</Grid>
<Flex className="pt-36 justify-center md:mr-[19%]">
{/* @ts-ignore */}
Expand Down
2 changes: 1 addition & 1 deletion apps/site/app/channel/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default async function Channel({
return (
<section>
<div className="fixed top-[var(--header-height)] z-50 w-full">
{/* <MarqueeWrapper /> */}
<MarqueeWrapper />
</div>
<Flex className="px-5 pt-[104px]">
<div className="hidden md:w-[19%] md:block">
Expand Down
2 changes: 1 addition & 1 deletion apps/site/app/directory/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export default async function Directory({
return (
<div className="pt-[104px]">
<div className="fixed top-[var(--header-height)] z-50 w-full">
{/* <MarqueeWrapper /> */}
<MarqueeWrapper />
</div>
<Flex className="px-5 pb-5 gap-y-[60px] flex-col md:flex-row md:gap-none">
<div className="md:w-[19%] md:block">
Expand Down
6 changes: 5 additions & 1 deletion apps/site/components/server/MarqueeWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand 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)
Expand All @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion apps/site/lib/username/getUsername.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }),
},
)

Expand Down

0 comments on commit 3f3b8c4

Please sign in to comment.