import React from 'react'; import moment from 'moment'; import classnames from 'classnames'; import { Tag } from 'antd'; import { Link } from 'react-router-dom'; import UnitDisplay from 'components/UnitDisplay'; import { RFP } from 'types'; import './RFPItem.less'; interface Props { rfp: RFP; isSmall?: boolean; } export default class RFPItem extends React.Component { render() { const { rfp, isSmall } = this.props; const { urlId, title, brief, acceptedProposals, dateOpened, dateCloses, dateClosed, bounty, matching, } = rfp; const closeDate = dateCloses || dateClosed; const tags = []; if (!isSmall) { if (bounty) { tags.push( bounty , ); } if (matching) { tags.push( x2 matching , ); } } return (

{title} {tags}

{brief}

{moment(dateOpened * 1000).format('LL')} {closeDate && <> – {moment(closeDate * 1000).format('LL')}}
{acceptedProposals.length} proposals approved
); } }