import { h } from 'preact';
import PropTypes from 'prop-types';
import { articlePropTypes } from '../../src/components/common-prop-types';
export const ContentTitle = ({ article, currentTag }) => (
{article.flare_tag && currentTag !== article.flare_tag.name && (
{`#${article.flare_tag.name}`}
)}
{article.class_name === 'PodcastEpisode' && (
podcast
)}
{article.class_name === 'User' && (
person
)}
{filterXSS(article.title)}
);
ContentTitle.defaultProps = {
currentTag: null,
};
ContentTitle.propTypes = {
article: articlePropTypes.isRequired,
currentTag: PropTypes.string,
};
ContentTitle.displayName = 'ContentTitle';