diff --git a/app/(app)/app/_sections/ExploreCreators.tsx b/app/(app)/app/_sections/ExploreCreators.tsx index 6fe4a62..a93a437 100644 --- a/app/(app)/app/_sections/ExploreCreators.tsx +++ b/app/(app)/app/_sections/ExploreCreators.tsx @@ -90,7 +90,7 @@ function Creator({ npub }: { npub: string }) { filter: { authors: [pubkey], kinds: [30023, 9802], - limit: 5, + limit: 10, }, }); const recentWork = events.map((e) => ({ diff --git a/app/(app)/app/_sections/LongFormContent.tsx b/app/(app)/app/_sections/LongFormContent.tsx index cfcc46d..fb4b253 100644 --- a/app/(app)/app/_sections/LongFormContent.tsx +++ b/app/(app)/app/_sections/LongFormContent.tsx @@ -1,3 +1,4 @@ +"use client"; import { Section, SectionHeader, @@ -9,7 +10,15 @@ import { RiArrowRightLine } from "react-icons/ri"; import KindCard from "@/components/KindCard"; import { DUMMY_30023 } from "@/constants"; import Link from "next/link"; +import useEvents from "@/lib/hooks/useEvents"; +import { Event } from "nostr-tools"; export default function LongFormContentSection() { + const { events } = useEvents({ + filter: { + kinds: [30023], + limit: 10, + }, + }); return (
@@ -19,27 +28,14 @@ export default function LongFormContentSection() { - - - - - - - - - - - - - - - - - - - - - + {events.map((e) => { + const event = e.rawEvent() as Event; + return ( + + + + ); + })}
); diff --git a/constants/app.ts b/constants/app.ts index 8d3fb28..ea88e26 100644 --- a/constants/app.ts +++ b/constants/app.ts @@ -5,7 +5,6 @@ export const EXPLORE_CREATORS = [ "npub19mduaf5569jx9xz555jcx3v06mvktvtpu0zgk47n4lcpjsz43zzqhj6vzk", "npub1dc9p7jzjhj86g2uqgltq4qvnpkyfqn9r72kdlddcgyat3j05gnjsgjc8rz", "npub1qny3tkh0acurzla8x3zy4nhrjz5zd8l9sy9jys09umwng00manysew95gx", - "npub17u5dneh8qjp43ecfxr6u5e9sjamsmxyuekrg2nlxrrk6nj9rsyrqywt4tp", "npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft", ]; diff --git a/constants/relays.ts b/constants/relays.ts index cce2024..e13c501 100644 --- a/constants/relays.ts +++ b/constants/relays.ts @@ -1,7 +1,7 @@ export const RELAYS = [ - "wss://nostr.pub.wellorder.net", - "wss://nostr.drss.io", - "wss://nostr.swiss-enigma.ch", - "wss://relay.damus.io", - ]; - \ No newline at end of file + "wss://nostr.pub.wellorder.net", + "wss://nostr.drss.io", + "wss://nostr.swiss-enigma.ch", + "wss://relay.damus.io", + "wss://nostr.wine", +]; diff --git a/lib/hooks/useEvents.ts b/lib/hooks/useEvents.ts index c4aa687..c48e502 100644 --- a/lib/hooks/useEvents.ts +++ b/lib/hooks/useEvents.ts @@ -1,3 +1,5 @@ +"use client"; + import { useState, useEffect } from "react"; import { useNDK } from "@/app/_providers/ndk"; import { diff --git a/lib/utils/index.ts b/lib/utils/index.ts index 0a406c2..850a6d6 100644 --- a/lib/utils/index.ts +++ b/lib/utils/index.ts @@ -48,7 +48,7 @@ export function getTwoLetters(user: { if (user.profile.displayName) { const firstLetter = user.profile.displayName.at(0); const secondLetter = - user.profile.displayName.split(" ")[1].at(0) ?? + user.profile.displayName.split(" ")[1]?.at(0) ?? user.profile.displayName.at(1) ?? ""; return firstLetter + secondLetter; @@ -56,7 +56,7 @@ export function getTwoLetters(user: { if (user.profile.name) { const firstLetter = user.profile.name.at(0); const secondLetter = - user.profile.name.split(" ")[1].at(0) ?? user.profile.name.at(1) ?? ""; + user.profile.name.split(" ")[1]?.at(0) ?? user.profile.name.at(1) ?? ""; return firstLetter + secondLetter; } }