import React from 'react'; import {formatDate} from '../dates'; import PlantedDate from './PlantedDate'; import PlantingChip from './PlantingChip'; // One annual planting as a row of two aligned columns: the crop, which is also // the planting's menu (and when it was planted), and how it is getting on // (badges, then a progress bar or a note when there is nothing to predict from). // `handlers` is what the menu's items open (see selectPlantingAction). export default function PlantingRow({planting, defaultIconUrl, highlighted, highlightKind = 'added', onUpdated, handlers}) { const {badges} = planting; return (
{highlighted && highlightKind === 'harvested' && (