Markdown
This commit is contained in:
@@ -6,6 +6,8 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter } from "
|
||||
import { Textarea } from "@/components/ui/textarea"
|
||||
import { supabase } from "@/auth/supabase"
|
||||
import { toast } from "sonner"
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
|
||||
|
||||
/* =====================================================
|
||||
Query keys & fetcher
|
||||
@@ -72,7 +74,7 @@ function ExpandableText({ text, mono = false }: { text?: string | string[] | nul
|
||||
const rendered = Array.isArray(text) ? `• ${content}` : content
|
||||
return (
|
||||
<div>
|
||||
<div className={`${mono ? "font-mono whitespace-pre-wrap" : ""} text-sm ${open ? "" : "line-clamp-10"}`}>{rendered}</div>
|
||||
<ReactMarkdown>{rendered}</ReactMarkdown>
|
||||
{String(rendered).length > 220 && (
|
||||
<button onClick={() => setOpen((v) => !v)} className="mt-2 text-xs font-medium text-neutral-600 hover:underline">
|
||||
{open ? "Ver menos" : "Ver más"}
|
||||
|
||||
Reference in New Issue
Block a user