import React from 'react'; import { connect } from 'react-redux'; import { FormattedMessage } from 'react-intl'; import ImmutablePureComponent from 'react-immutable-pure-component'; import StatusContent from 'soapbox/components/status_content'; import { buildStatus } from '../builder'; import classNames from 'classnames'; import RelativeTimestamp from 'soapbox/components/relative_timestamp'; import { Link, NavLink } from 'react-router-dom'; import { getDomain } from 'soapbox/utils/accounts'; import Avatar from 'soapbox/components/avatar'; import DisplayName from 'soapbox/components/display_name'; import AttachmentList from 'soapbox/components/attachment_list'; import PollPreview from './poll_preview'; import ScheduledStatusActionBar from './scheduled_status_action_bar'; const mapStateToProps = (state, props) => { const scheduledStatus = state.getIn(['scheduled_statuses', props.statusId]); return { status: buildStatus(state, scheduledStatus), }; }; export default @connect(mapStateToProps) class ScheduledStatus extends ImmutablePureComponent { render() { const { status, showThread, account, ...other } = this.props; if (!status.get('account')) return null; const statusUrl = `/scheduled_statuses/${status.get('id')}`; const favicon = status.getIn(['account', 'pleroma', 'favicon']); const domain = getDomain(status.get('account')); return (