import clsx from "clsx"; import Spinner from "../Spinner"; import { t } from "../../i18n"; import { alertTriangleIcon } from "../icons"; interface TTDDialogOutputProps { error: Error | null; canvasRef: React.RefObject; loaded: boolean; hideErrorDetails?: boolean; } export const TTDDialogOutput = ({ error, canvasRef, loaded, hideErrorDetails, }: TTDDialogOutputProps) => { return (
{error && (
{alertTriangleIcon}
{t("ttd.error")}
{hideErrorDetails ? t("chat.errors.mermaidParseError") : error.message}
)} {loaded ? (
) : ( )}
); };