👌 IMPROVE: Commentaires sur profil en Markdown
This commit is contained in:
parent
6c8e57540b
commit
a2ee5e4f44
@ -10,6 +10,8 @@ import Modal from '../../components/Modal';
|
|||||||
import redirect from '../../utils/redirect';
|
import redirect from '../../utils/redirect';
|
||||||
import htmlParser from 'html-react-parser';
|
import htmlParser from 'html-react-parser';
|
||||||
import Loader from '../../components/Loader';
|
import Loader from '../../components/Loader';
|
||||||
|
import ReactMarkdown from 'react-markdown';
|
||||||
|
import CodeBlock from "../../components/CodeBlock";
|
||||||
import api from '../../utils/api';
|
import api from '../../utils/api';
|
||||||
import { API_URL } from '../../utils/config/config';
|
import { API_URL } from '../../utils/config/config';
|
||||||
import '../../public/css/pages/profile.css';
|
import '../../public/css/pages/profile.css';
|
||||||
@ -179,18 +181,18 @@ const Profile = (props) => {
|
|||||||
<div className="col-24 text-center">
|
<div className="col-24 text-center">
|
||||||
<h2>Derniers <span className="important">commentaires</span> :</h2>
|
<h2>Derniers <span className="important">commentaires</span> :</h2>
|
||||||
</div>
|
</div>
|
||||||
<div className="col-24 text-center">
|
<div className="col-24">
|
||||||
{props.commentsArray.map((comment) => (
|
{props.commentsArray.map((comment) => (
|
||||||
<div key={comment.id} className="row Profile__row Profile__comment">
|
<div key={comment.id} className="row Profile__row Profile__comment">
|
||||||
<div className="col-20">
|
<div className="col-20">
|
||||||
<p>
|
<p style={{ textAlign: 'center', marginTop: '30px' }}>
|
||||||
Posté sur la fonction
|
Posté sur la fonction
|
||||||
<Link href={(comment.function.type === 'form' || comment.function.type === 'article') ? "/functions/[slug]" : `/functions/${comment.function.slug}`} as={`/functions/${comment.function.slug}`}>
|
<Link href={(comment.function.type === 'form' || comment.function.type === 'article') ? "/functions/[slug]" : `/functions/${comment.function.slug}`} as={`/functions/${comment.function.slug}`}>
|
||||||
<a>{comment.function.title}</a>
|
<a>{comment.function.title}</a>
|
||||||
</Link>
|
</Link>
|
||||||
le {date.format(new Date(comment.createdAt), 'DD/MM/YYYY à HH:mm', true)}
|
le {date.format(new Date(comment.createdAt), 'DD/MM/YYYY à HH:mm', true)}
|
||||||
</p>
|
</p>
|
||||||
<p>"{comment.message}"</p>
|
<ReactMarkdown source={comment.message} renderers={{ code: CodeBlock }} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
|
@ -43,6 +43,9 @@ const Register = () => {
|
|||||||
<div className="row Register-Login__row justify-content-center">
|
<div className="row Register-Login__row justify-content-center">
|
||||||
<div className="col-20">
|
<div className="col-20">
|
||||||
<h1 className="Register-Login__title">S'inscrire</h1>
|
<h1 className="Register-Login__title">S'inscrire</h1>
|
||||||
|
<div className="text-center">
|
||||||
|
<p>En vous inscrivant, vous accéderez à de nombreuses fonctionnalités : publier des commentaires, ajouter des fonctions aux favoris, utiliser certaines fonctions disponibles qu'aux membres (exemple: La To Do list) etc.</p>
|
||||||
|
</div>
|
||||||
<form onSubmit={handleSubmit}>
|
<form onSubmit={handleSubmit}>
|
||||||
<div className="form-group">
|
<div className="form-group">
|
||||||
<label className="form-label" htmlFor="name">Nom :</label>
|
<label className="form-label" htmlFor="name">Nom :</label>
|
||||||
|
Reference in New Issue
Block a user