frontend throws this error, any idea to fix it ? It seems related to react-pdf.
./components/Chat/ChatRichContentItem.tsx:200:23
Type error: No overload matches this call.
Overload 1 of 2, '(props: Props | Readonly<Props>): Document', gave the following error.
Type 'Element' is not assignable to type 'ReactNode'.
Overload 2 of 2, '(props: Props, context: any): Document', gave the following error.
Type 'Element' is not assignable to type 'ReactNode'.
198 | }}
199 | >
> 200 | <Page pageNumber={pageNumber} />
| ^
201 | </Document>
202 |
203 | <div className="flex gap-2 item-center mt-3">
another case
./components/CodeModal/CodeModal.tsx:73:5
Type error: Argument of type 'Element' is not assignable to parameter of type 'ReactNode'.
Property 'children' is missing in type 'Element' but required in type 'ReactPortal'.
71 |
72 | return createPortal(
> 73 | <Rnd
| ^
74 | dragHandleClassName="handle"
75 | className="z-[9999] shadow-lg"
76 | default={{
maybe it's simple but I have no experience of react and typescript.
frontend throws this error, any idea to fix it ? It seems related to react-pdf.
another case
maybe it's simple but I have no experience of react and typescript.