feat: close #580 export messages as image

This commit is contained in:
Yidadaa
2023-05-22 00:59:36 +08:00
parent 05b1b8b240
commit 4dad7f2ab6
11 changed files with 934 additions and 54 deletions

View File

@@ -121,7 +121,7 @@ export function Markdown(
content: string;
loading?: boolean;
fontSize?: number;
parentRef: RefObject<HTMLDivElement>;
parentRef?: RefObject<HTMLDivElement>;
defaultShow?: boolean;
} & React.DOMAttributes<HTMLDivElement>,
) {
@@ -129,7 +129,7 @@ export function Markdown(
const renderedHeight = useRef(0);
const inView = useRef(!!props.defaultShow);
const parent = props.parentRef.current;
const parent = props.parentRef?.current;
const md = mdRef.current;
const checkInView = () => {