mirror of
https://github.com/usestrix/strix.git
synced 2026-08-25 12:22:37 +02:00
`strix view` opens a run in the browser, served locally from the run files (nothing is uploaded). There's also a quick link to it from the TUI and the end-of-run summary.
25 lines
585 B
TypeScript
25 lines
585 B
TypeScript
"use client";
|
|
|
|
import ReactMarkdown from "react-markdown";
|
|
import remarkGfm from "remark-gfm";
|
|
import { rehypeCodeMeta, mdComponents } from "@/components/vulnerability/MdCodeBlock";
|
|
|
|
interface MarkdownProps {
|
|
text: string;
|
|
className?: string;
|
|
}
|
|
|
|
export default function Markdown({ text, className = "" }: MarkdownProps) {
|
|
return (
|
|
<div className={`prose-markdown ${className}`}>
|
|
<ReactMarkdown
|
|
remarkPlugins={[remarkGfm]}
|
|
rehypePlugins={[rehypeCodeMeta]}
|
|
components={mdComponents}
|
|
>
|
|
{text}
|
|
</ReactMarkdown>
|
|
</div>
|
|
);
|
|
}
|