diff --git a/app/src/frontend/building/data-containers/land-use.tsx b/app/src/frontend/building/data-containers/land-use.tsx index d72add63..e8e8b1be 100644 --- a/app/src/frontend/building/data-containers/land-use.tsx +++ b/app/src/frontend/building/data-containers/land-use.tsx @@ -1,7 +1,7 @@ import React, { Fragment } from 'react'; import InfoBox from '../../components/info-box'; -import { dataFields } from '../../config/data-fields-config'; +import { commonSourceTypes, dataFields } from '../../config/data-fields-config'; import DataEntry from '../data-components/data-entry'; import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry'; import SelectDataEntry from '../data-components/select-data-entry'; @@ -62,8 +62,8 @@ const UseView: React.FunctionComponent = (props) => { onChange={props.onChange} tooltip={dataFields.is_domestic_source.tooltip} /> - {(props.building.is_domestic_source == "Expert knowledge" || - props.building.is_domestic_source == "Observed from the street" || + {(props.building.is_domestic_source == commonSourceTypes[0] || + props.building.is_domestic_source == commonSourceTypes[1] || props.building.is_domestic_source == null) ? <> : <> = (props) => ( placeholder={dataFields.location_address_source.example} options={dataFields.location_address_source.items} /> - {(props.building.location_address_source == "Expert/personal knowledge of building" || - props.building.location_address_source == "Online streetview image" || + {(props.building.location_address_source == commonSourceTypes[0] || + props.building.location_address_source == commonSourceTypes[1] || props.building.location_address_source == null) ? <> : <> = (props) => ( placeholder={dataFields.location_coordinates_source.example} options={dataFields.location_coordinates_source.items} /> - {(props.building.location_coordinates_source == "Expert/personal knowledge of building" || - props.building.location_coordinates_source == "Online streetview image" || + {(props.building.location_coordinates_source == commonSourceTypes[0] || + props.building.location_coordinates_source == commonSourceTypes[1] || props.building.location_coordinates_source == null) ? <> : <>