import React, { Fragment } from 'react'; import InfoBox from '../../components/info-box'; import CheckboxDataEntry from '../data-components/checkbox-data-entry'; interface PlanningDataOfficialDataEntryProps { value: any; // TODO: proper structuring! } const {useState} = React; const LongText = ({ content,limit}) => { const [showAll, setShowAll] = useState(false); const showMore = () => setShowAll(true); const showLess = () => setShowAll(false); if (content.length <= limit) { return
{content}
} if (showAll) { return
{content}
Shorten description
} const toShow = content.substring(0, limit).trim() + "... "; return
{toShow}
Show full description
} const Disclaimer = () => { return
Disclaimer: these data are currently incomplete and also often do not provide information on minor alterations. For comprehensive information on all applications please visit the local authorities' planning websites.
} const PlanningDataOfficialDataEntry: React.FC = (props) => { const data = props.value || []; if(data.length == 0) { return ( No live planning data available currently for this building polygon via the Planning London DataHub. ); } return (
Planning application status is streamed using live data uploaded by local authorities to the {data[0]["data_source"]}

Current planning application status for this site: {data[0]["status"]}
Planning application ID: {data[0]["planning_application_id"]}
Date registered by the planning authority (validation date): {data[0]["registered_with_local_authority_date"]}
Decision date: {data[0]["decision_date"].toString()}
Description of proposed work:
Most recent update by data provider: {data[0]["decision_date"]}
); }; export default PlanningDataOfficialDataEntry;