This commit is contained in:
2025-10-23 15:37:30 -06:00
parent ff82d0c364
commit 78580df13b
3 changed files with 161 additions and 1 deletions

View File

@@ -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"}