dispatch/client/js/components/modals/Topic.js

22 lines
560 B
JavaScript
Raw Normal View History

2019-01-25 02:57:58 +00:00
import React from 'react';
2020-04-29 01:10:13 +00:00
import { FiX } from 'react-icons/fi';
import Button from 'components/ui/Button';
2019-01-25 02:57:58 +00:00
import withModal from 'components/modals/withModal';
import { linkify } from 'utils';
const Topic = ({ payload: { topic, channel }, onClose }) => {
return (
<>
<div className="modal-header">
<h2>Topic in {channel}</h2>
2020-04-29 01:10:13 +00:00
<Button icon={FiX} className="modal-close" onClick={onClose} />
2019-01-25 02:57:58 +00:00
</div>
<p className="modal-content">{linkify(topic)}</p>
</>
);
};
export default withModal({
name: 'topic'
})(Topic);