diff --git a/src/components/Chat.tsx b/src/components/Chat.tsx index 597c973e..2fb3718d 100644 --- a/src/components/Chat.tsx +++ b/src/components/Chat.tsx @@ -31,7 +31,7 @@ export function Chat() { - + {sanitizeQuestionPrompt({ question: question?.message ?? "", answer: answer?.message ?? "", diff --git a/src/components/Dashboard.tsx b/src/components/Dashboard.tsx index 938a2fac..1b0516cc 100644 --- a/src/components/Dashboard.tsx +++ b/src/components/Dashboard.tsx @@ -28,9 +28,9 @@ const wrapObjectOutput = (input: AlertConversation["trigger_string"]) => { if (data === null) return "N/A"; if (typeof data === "string") { return ( - - {data} - +
+ {data} +
); } if (!data.type || !data.name) return "N/A"; diff --git a/src/components/Help.tsx b/src/components/Help.tsx index 3a4a87c5..82123bae 100644 --- a/src/components/Help.tsx +++ b/src/components/Help.tsx @@ -30,7 +30,7 @@ export function Help() { } catch (error) { console.error("Error loading help content:", error); setContent( - "# Error\nFailed to load help content. Please try again later." + "# Error\nFailed to load help content. Please try again later.", ); } }; @@ -40,20 +40,7 @@ export function Help() { return (
- - {content} - + {content}
); } diff --git a/src/components/Markdown.tsx b/src/components/Markdown.tsx index 9c88c122..3ba7488b 100644 --- a/src/components/Markdown.tsx +++ b/src/components/Markdown.tsx @@ -2,7 +2,6 @@ import remarkGfm from "remark-gfm"; import ReactMarkdown from "react-markdown"; import { Prism as SyntaxHighlighter } from "react-syntax-highlighter"; import { oneDark } from "react-syntax-highlighter/dist/esm/styles/prism"; -import { cn } from "@/lib/utils"; import { CopyToClipboard } from "./CopyToClipboard"; import hljs from "highlight.js"; @@ -33,7 +32,7 @@ const LANGUAGES_SUBSET_DETECTION = [ interface Props { children: string; - className?: string; + isInverted?: boolean; } const customStyle = { @@ -52,9 +51,11 @@ const customStyle = { boxSizing: "border-box", }, }; -export function Markdown({ children, className = "" }: Props) { + +export function Markdown({ children, isInverted = false }: Props) { return ( ); }, - p({ children }) { - return ( -

- {children} -

- ); - }, pre({ children }) { - return
{children}
; + return children; }, - a({ children, ...props }) { return ( {children}