"use client"; import { Section, SectionHeader, SectionTitle, SectionContent, } from "@/containers/PageSection"; import { Button } from "@/components/ui/button"; import { RiArrowRightLine } from "react-icons/ri"; import KindCard from "@/components/KindCard"; import { NOTABLE_ACCOUNTS } from "@/constants"; import Link from "next/link"; import useEvents from "@/lib/hooks/useEvents"; import { Event } from "nostr-tools"; import KindLoading from "@/components/KindCard/loading"; import { nip19 } from "nostr-tools"; import { getTagValues } from "@/lib/nostr/utils"; export default function LongFormContentSection() { const { events } = useEvents({ filter: { kinds: [30023], authors: NOTABLE_ACCOUNTS.map((a) => nip19.decode(a).data.toString()), limit: 10, }, }); return (
Long form content {events?.length ? ( events .filter((e) => !!getTagValues("summary", e.tags)) .slice(0, 6) .map((e, idx) => { if (idx > 6) return null; const event = e.rawEvent() as Event; return ( ); }) ) : ( <> )}
); }