aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuentin Gliech <quentingliech@gmail.com>2020-02-12 22:22:43 +0100
committerQuentin Gliech <quentingliech@gmail.com>2020-02-12 22:23:22 +0100
commitc2d18b3a9bec9933d2845ce3cfc6dd5b4f3ff348 (patch)
tree629ef5b7b346d4cb092dcd4428a6ea5c7ba0e35b
parent0c17d248ee1536aa02ab5beb0c935607421a6b8d (diff)
downloadgit-bug-c2d18b3a9bec9933d2845ce3cfc6dd5b4f3ff348.tar.gz
webui: fix Content type
-rw-r--r--webui/src/Content.tsx8
1 files changed, 4 insertions, 4 deletions
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<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;