import React from 'react'; import ng from 'core/services/ng'; import {IPropsItemListInfo} from '../ListItemInfo'; type IProps = Pick; class ScheduledDateTime extends React.PureComponent { datetime: any; constructor(props: IProps) { super(props); this.datetime = ng.get('datetime'); } render() { const scheduled = this.props.item.archive_item?.schedule_settings?.utc_publish_schedule; if (this.props.item.state != null && this.props.item.state === 'scheduled' && scheduled != null) { const datetime = this.datetime; return ( { datetime.scheduledFormat(scheduled) } ); } else { return null; } } } export const scheduledDateTime = ScheduledDateTime;