From c2d18b3a9bec9933d2845ce3cfc6dd5b4f3ff348 Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 12 Feb 2020 22:22:43 +0100 Subject: webui: fix Content type --- webui/src/Content.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'webui/src') diff --git a/webui/src/Content.tsx b/webui/src/Content.tsx index 889c9987..3a7af2f8 100644 --- a/webui/src/Content.tsx +++ b/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 = ({ 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; -- cgit