import React from 'react'; import {formatDate} from '../dates'; import {isPlainClick} from '../events'; import ActionsMenu from './ActionsMenu'; import CropChip from './CropChip'; import PlantedDate from './PlantedDate'; // One annual planting as a row of three aligned columns: the crop (and when it // was planted), how it is getting on (badges, then a progress bar or a note // when there is nothing to predict from), and its own actions menu. export default function PlantingRow({planting, defaultIconUrl, highlighted, highlightKind = 'added', onUpdated, onEdit, onHarvest}) { const {id, url, crop, badges} = planting; return (
{highlighted && highlightKind === 'harvested' && (