refactor: remove react-markdown dependency and enhance document editing logic

- Removed the react-markdown dependency from package.json and pnpm-lock.yaml.
- Introduced a constant for editable document types in RowActions component to streamline edit functionality.
- Updated RowActions to conditionally render edit options based on document type, improving user experience.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-01-06 03:09:49 -08:00
parent 74f6811b48
commit 929bc026e6
4 changed files with 38 additions and 32 deletions

View file

@ -1,6 +1,5 @@
import Image from "next/image";
import type { Components } from "react-markdown";
import { Streamdown } from "streamdown";
import { type StreamdownProps, Streamdown } from "streamdown";
import { cn } from "@/lib/utils";
interface MarkdownViewerProps {
@ -9,7 +8,7 @@ interface MarkdownViewerProps {
}
export function MarkdownViewer({ content, className }: MarkdownViewerProps) {
const components: Components = {
const components: StreamdownProps["components"] = {
// Define custom components for markdown elements
p: ({ children, ...props }) => (
<p className="my-2" {...props}>