mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-17 13:01:24 +00:00
26 lines
556 B
TypeScript
26 lines
556 B
TypeScript
import React from "react";
|
|
import { LazyMessageResponse } from "../ai-elements/LazyMessageResponse";
|
|
|
|
export function MarkdownPreview({
|
|
content,
|
|
emptyText,
|
|
}: {
|
|
content: string;
|
|
emptyText: string;
|
|
}) {
|
|
const trimmed = content.trim();
|
|
if (!trimmed) {
|
|
return (
|
|
<div className="flex h-full items-center justify-center text-sm text-muted-foreground">
|
|
{emptyText}
|
|
</div>
|
|
);
|
|
}
|
|
|
|
return (
|
|
<LazyMessageResponse className="text-sm leading-relaxed text-foreground/90">
|
|
{trimmed}
|
|
</LazyMessageResponse>
|
|
);
|
|
}
|