Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/openstatusHQ/openstatus. ๐ซ Status page with uptime monitoring & API monitoring as code ๐ซ openstatus.dev
bun drizzle-orm monitoring monitoring-as-code nextjs observability on-call open-source shadcn-ui status-page statuspage synthetic-monitoring tinybird turso uptime uptime-checker uptime-monitor
Something went wrong. Try again.
923 B ยท 34 lines
TSX
1234567891011121314151617181920212223242526272829303132333435import type { AnchorHTMLAttributes } from "react";import { Fragment, createElement } from "react";import { jsx, jsxs } from "react/jsx-runtime";import rehypeReact from "rehype-react";import remarkParse from "remark-parse";import remarkRehype from "remark-rehype";import { unified } from "unified";
export function ProcessMessage({ value }: { value: string }) { const result = unified() .use(remarkParse) .use(remarkRehype) .use(rehypeReact, { createElement, Fragment, jsx, jsxs, components: { a: (props: AnchorHTMLAttributes<HTMLAnchorElement>) => { return ( <a target="_blank" rel="noreferrer" className="underline" {...props} /> ); }, } as { [key: string]: React.ComponentType<unknown> }, }) .processSync(value).result;
return result;}