import parse from 'html-react-parser';
import { isNil } from 'ramda';
import DOMPurify from 'dompurify';

const renderHtmlContent = (content = '') => {
    const clean = DOMPurify.sanitize(content);
    return !isNil(clean) ? parse(clean) : '';
}

export default renderHtmlContent;