mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-20 21:18:13 +02:00
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:
parent
74f6811b48
commit
929bc026e6
4 changed files with 38 additions and 32 deletions
|
|
@ -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}>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue