mirror of https://github.com/casbin/casnode.git
fix: add renderImage and renderLink for SingleReplyBox.js (#511)
This commit is contained in:
parent
0937908930
commit
3d8d99de55
|
@ -21,6 +21,7 @@ import Avatar from "../Avatar";
|
|||
import ReactMarkdown from "react-markdown";
|
||||
import UserLink from "../UserLink";
|
||||
import { Helmet } from "react-helmet";
|
||||
import Zmage from "react-zmage";
|
||||
|
||||
class SingleReplyBox extends React.Component {
|
||||
constructor(props) {
|
||||
|
@ -53,6 +54,14 @@ class SingleReplyBox extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
renderImage = ({ alt, src }) => {
|
||||
return <Zmage src={src} alt={alt} />;
|
||||
};
|
||||
|
||||
renderLink = (props) => {
|
||||
return <a {...props} target="_blank" rel="nofollow noopener noreferrer" />;
|
||||
};
|
||||
|
||||
renderSingleReplyBox(reply) {
|
||||
return (
|
||||
<div id={`r_${reply.id}`}>
|
||||
|
|
Loading…
Reference in New Issue