add logic based on is_extension

This commit is contained in:
Ed Chalstrey 2022-06-01 14:08:46 +01:00
parent 6a7bfdf5e7
commit 2d65372a56

View File

@ -15,6 +15,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
const building = props.building; const building = props.building;
const currentYear = new Date().getFullYear(); const currentYear = new Date().getFullYear();
const currentBuildingConstructionYear = building.date_year || undefined; const currentBuildingConstructionYear = building.date_year || undefined;
if (props.building.is_extension == "The main building"){
return ( return (
<Fragment> <Fragment>
<InfoBox msg="Can you help us capture information on who built the current building?"></InfoBox> <InfoBox msg="Can you help us capture information on who built the current building?"></InfoBox>
@ -44,6 +45,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
/> />
</Fragment> </Fragment>
); );
};
}; };
const TeamContainer = withCopyEdit(TeamView); const TeamContainer = withCopyEdit(TeamView);