mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-14 17:12:40 +00:00
upadte notification popup to handle markdown
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
require('./notificationPopup.less');
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import request from '../../utils/request-middleware.js';
|
||||
import Markdown from 'naturalcrit/markdown.js';
|
||||
|
||||
import Dialog from '../../../components/dialog.jsx';
|
||||
|
||||
@@ -40,11 +41,11 @@ const NotificationPopup = ()=>{
|
||||
|
||||
const renderNotificationsList = ()=>{
|
||||
if(error) return <div className='error'>{error}</div>;
|
||||
|
||||
notifications.map((notification) =>console.log(Markdown.render(notification.text, 1)));
|
||||
return notifications.map((notification)=>(
|
||||
<li key={notification.dismissKey} >
|
||||
<em>{notification.title}</em><br />
|
||||
<p dangerouslySetInnerHTML={{ __html: notification.text }}></p>
|
||||
<p dangerouslySetInnerHTML={{ __html: Markdown.render(notification.text, 1) }}></p>
|
||||
</li>
|
||||
));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user