2023-10-14 18:57:37 -04:00
|
|
|
import Container from "./components/Container";
|
|
|
|
import { CardTitle, CardDescription } from "@/components/ui/card";
|
|
|
|
import { type Event } from "nostr-tools";
|
2023-10-15 10:58:44 -04:00
|
|
|
import { RenderText } from "../TextRendering";
|
|
|
|
import { getTagsValues } from "@/lib/nostr/utils";
|
|
|
|
import LinkCard from "@/components/LinkCard";
|
|
|
|
export default function Kind1({ content, tags }: Event) {
|
|
|
|
const r = getTagsValues("r", tags);
|
2023-10-14 18:57:37 -04:00
|
|
|
return (
|
|
|
|
<Container>
|
2023-10-15 10:58:44 -04:00
|
|
|
<CardDescription className="text-base text-foreground">
|
|
|
|
<RenderText text={content} />
|
2023-10-14 18:57:37 -04:00
|
|
|
</CardDescription>
|
2023-10-15 10:58:44 -04:00
|
|
|
{!!r.length && (
|
|
|
|
<div className="mt-1.5 flex flex-wrap">
|
|
|
|
{r.map((url) => (
|
|
|
|
<LinkCard key={url} url={url} className="max-w-[250px]" />
|
|
|
|
))}
|
|
|
|
</div>
|
|
|
|
)}
|
2023-10-14 18:57:37 -04:00
|
|
|
</Container>
|
|
|
|
);
|
|
|
|
}
|