From fec74c4a84e4bc3fe3d65a95331aa314de9ebfa7 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Wed, 8 Feb 2023 10:28:58 +0100 Subject: [PATCH] prevent duplication in landuse code --- .../frontend/building/data-containers/use.tsx | 76 ++----------------- 1 file changed, 8 insertions(+), 68 deletions(-) diff --git a/app/src/frontend/building/data-containers/use.tsx b/app/src/frontend/building/data-containers/use.tsx index 6af69870..8ec5c45a 100644 --- a/app/src/frontend/building/data-containers/use.tsx +++ b/app/src/frontend/building/data-containers/use.tsx @@ -16,10 +16,6 @@ import Verification from '../data-components/verification'; * Use view/edit section */ const UseView: React.FunctionComponent = (props) => { - if (props.building.current_landuse_source == "Expert/personal knowledge of building" || - props.building.current_landuse_source == "Online streetview image" || - props.building.current_landuse_source == null - ){ return ( = (props) => { user_verified_as={props.user_verified.current_landuse_source} verified_count={props.building.verified.current_landuse_source} /> - - ); - }; - return ( - - - - - { - props.mode != 'view' && - - } - - - - : + <> = (props) => { user_verified_as={props.user_verified.current_landuse_link} verified_count={props.building.verified.current_landuse_link} /> - - ); + + } + + ); }; const UseContainer = withCopyEdit(UseView);