import React, { Fragment } from 'react'; import { NavLink } from 'react-router-dom'; import { AggregationDescriptionConfig, buildingUserFields, dataFields } from '../../config/data-fields-config'; import { CopyProps } from '../data-containers/category-view-props'; import { DataTitleCopyable } from './data-title'; interface UserOpinionEntryProps { slug: string; title: string; mode: 'view' | 'edit' | 'multi-edit'; userValue: boolean; aggregateValue: number; aggregationDescriptions: AggregationDescriptionConfig; copy: CopyProps; onChange: (key: string, value: boolean) => void; } const UserOpinionEntry: React.FunctionComponent = (props) => { return ( <>

{ (props.aggregateValue)? (props.aggregateValue === 1)? `1 person ${props.aggregationDescriptions.one}` : `${props.aggregateValue} people ${props.aggregationDescriptions.many}` : `0 people ${props.aggregationDescriptions.zero}` }

); }; export default UserOpinionEntry;