import PropTypes from 'prop-types'; import { defineMessages, FormattedMessage, useIntl } from 'react-intl'; import ImmutablePropTypes from 'react-immutable-proptypes'; import { RelativeTimestamp } from 'mastodon/components/relative_timestamp'; // This needs to be kept in sync with app/models/relationship_severance_event.rb const messages = defineMessages({ account_suspension: { id: 'relationship_severance_notification.types.account_suspension', defaultMessage: 'Account has been suspended' }, domain_block: { id: 'relationship_severance_notification.types.domain_block', defaultMessage: 'Domain has been suspended' }, user_domain_block: { id: 'relationship_severance_notification.types.user_domain_block', defaultMessage: 'You blocked this domain' }, }); const RelationshipsSeveranceEvent = ({ event, hidden }) => { const intl = useIntl(); if (hidden || !event) { return null; } return (
); }; RelationshipsSeveranceEvent.propTypes = { event: ImmutablePropTypes.map.isRequired, hidden: PropTypes.bool, }; export default RelationshipsSeveranceEvent;