webui: fix Content type

Quentin Gliech created

Change summary

webui/src/Content.tsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Detailed changes

webui/src/Content.tsx 🔗

@@ -1,4 +1,4 @@
-import { ReactNode } from 'react';
+import React from 'react';
 import html from 'remark-html';
 import parse from 'remark-parse';
 import remark2react from 'remark-react';
@@ -8,7 +8,7 @@ import ImageTag from './tag/ImageTag';
 import PreTag from './tag/PreTag';
 
 type Props = { markdown: string };
-const Content = ({ markdown }: Props) => {
+const Content: React.FC<Props> = ({ markdown }: Props) => {
   const processor = unified()
     .use(parse)
     .use(html)
@@ -19,8 +19,8 @@ const Content = ({ markdown }: Props) => {
       },
     });
 
-  const contents: ReactNode = processor.processSync(markdown).contents;
-  return contents;
+  const contents: React.ReactNode = processor.processSync(markdown).contents;
+  return <>{contents}</>;
 };
 
 export default Content;