From 4ad1f101101771350b253762c5b02d57df6f4ddd Mon Sep 17 00:00:00 2001 From: eug-vs Date: Sat, 9 Jan 2021 16:06:48 +0300 Subject: feat: use remark-gemoji --- src/lib/Markdown/Markdown.tsx | 11 +++++++++-- src/lib/Markdown/emojilib.d.ts | 2 -- src/lib/Markdown/remark-gemoji.d.ts | 2 ++ src/lib/Markdown/types.ts | 4 ---- 4 files changed, 11 insertions(+), 8 deletions(-) delete mode 100644 src/lib/Markdown/emojilib.d.ts create mode 100644 src/lib/Markdown/remark-gemoji.d.ts delete mode 100644 src/lib/Markdown/types.ts diff --git a/src/lib/Markdown/Markdown.tsx b/src/lib/Markdown/Markdown.tsx index 01923f9..955aeda 100644 --- a/src/lib/Markdown/Markdown.tsx +++ b/src/lib/Markdown/Markdown.tsx @@ -1,7 +1,8 @@ import React, { useState, useEffect } from 'react'; +import { Link, Typography } from '@material-ui/core'; import axios from 'axios'; import ReactMarkdown from 'react-markdown'; -import { Link, Typography } from '@material-ui/core'; +import emoji from 'remark-gemoji'; import CodeBlock from './CodeBlock'; import InlineCode from './InlineCode'; @@ -44,7 +45,13 @@ const Markdown: React.FC = ({ data, url }) => { return ( - {sanitized} + + {sanitized} + ); }; diff --git a/src/lib/Markdown/emojilib.d.ts b/src/lib/Markdown/emojilib.d.ts deleted file mode 100644 index cddfeea..0000000 --- a/src/lib/Markdown/emojilib.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -declare module 'emojilib'; - diff --git a/src/lib/Markdown/remark-gemoji.d.ts b/src/lib/Markdown/remark-gemoji.d.ts new file mode 100644 index 0000000..d4b4bf6 --- /dev/null +++ b/src/lib/Markdown/remark-gemoji.d.ts @@ -0,0 +1,2 @@ +declare module 'remark-gemoji'; + diff --git a/src/lib/Markdown/types.ts b/src/lib/Markdown/types.ts deleted file mode 100644 index 0b6f4b6..0000000 --- a/src/lib/Markdown/types.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ParserPropTypes { - rawLines: string[]; -} - -- cgit v1.2.3