import { h } from 'preact'; import { articlePropTypes, organizationPropType, } from '../../common-prop-types'; import { MinimalProfilePreviewCard } from '../../profilePreviewCards/MinimalProfilePreviewCard'; import { PublishDate } from './PublishDate'; export const Meta = ({ article, organization }) => { const orgArticleIndexClassAbsent = !document.getElementById( 'organization-article-index', ); return (
{organization && orgArticleIndexClassAbsent && ( {`${organization.name} )} {`${article.user.username}

{filterXSS( article.class_name === 'User' ? article.user.username : article.user.name, )} {organization && !document.getElementById('organization-article-index') && ( {' for '} {organization.name} )}

); }; Meta.defaultProps = { organization: null, }; Meta.propTypes = { article: articlePropTypes.isRequired, organization: organizationPropType, }; Meta.displayName = 'Meta';