2023-10-14 18:57:37 -04:00
|
|
|
"use client";
|
|
|
|
import Container from "./components/Container";
|
|
|
|
import { CardTitle, CardDescription } from "@/components/ui/card";
|
|
|
|
import { getTagValues, getTagsValues } from "@/lib/nostr/utils";
|
|
|
|
import { type Event } from "nostr-tools";
|
|
|
|
import { removeDuplicates } from "@/lib/utils";
|
|
|
|
|
2023-10-15 11:44:15 -04:00
|
|
|
export default function Kind30023({ content, pubkey, tags }: Event) {
|
2023-10-14 18:57:37 -04:00
|
|
|
const title = getTagValues("title", tags);
|
|
|
|
const summary = getTagValues("summary", tags);
|
2023-10-15 22:55:33 -04:00
|
|
|
const contentTags = removeDuplicates(getTagsValues("t", tags)).filter(
|
|
|
|
Boolean,
|
|
|
|
);
|
2023-10-14 18:57:37 -04:00
|
|
|
|
|
|
|
return (
|
2023-10-15 11:44:15 -04:00
|
|
|
<Container pubkey={pubkey} contentTags={contentTags}>
|
2023-10-14 18:57:37 -04:00
|
|
|
<CardTitle className="mb-1.5 line-clamp-2 text-lg font-semibold">
|
|
|
|
{title}
|
|
|
|
</CardTitle>
|
|
|
|
<CardDescription className="line-clamp-4 text-sm">
|
|
|
|
{summary ?? content}
|
|
|
|
</CardDescription>
|
|
|
|
</Container>
|
|
|
|
);
|
|
|
|
}
|