mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Add markdown support (#115)
This commit is contained in:
committed by
GitHub
parent
78049a820c
commit
35c427d9f6
@@ -1,9 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
|
||||
import LikeButton from '../../containers/LikeButton';
|
||||
import CommentsNumber from '../shared/CommentsNumber';
|
||||
import PostStatusLabel from '../shared/PostStatusLabel';
|
||||
import { DescriptionText } from '../shared/CustomTexts';
|
||||
|
||||
import IPostStatus from '../../interfaces/IPostStatus';
|
||||
|
||||
@@ -43,7 +43,9 @@ const PostListItem = ({
|
||||
|
||||
<div className="postContainer">
|
||||
<span className="postTitle">{title}</span>
|
||||
<DescriptionText limit={120}>{description}</DescriptionText>
|
||||
<ReactMarkdown className="descriptionText" allowedTypes={['text']} unwrapDisallowed>
|
||||
{description?.slice(0, 120)}
|
||||
</ReactMarkdown>
|
||||
|
||||
<div className="postDetails">
|
||||
<CommentsNumber number={commentsCount} />
|
||||
|
||||
Reference in New Issue
Block a user