diff --git a/client/src/components/AreaDetail/AreaDetail.tsx b/client/src/components/AreaDetail/AreaDetail.tsx index e28c0b00..3f27859f 100644 --- a/client/src/components/AreaDetail/AreaDetail.tsx +++ b/client/src/components/AreaDetail/AreaDetail.tsx @@ -1036,6 +1036,12 @@ const AreaDetail = ({properties}: IAreaDetailProps) => { properties[constants.TOTAL_NUMBER_OF_DISADVANTAGE_INDICATORS] === 0; const showIslandCopy = isTerritory && !showDonutCopy; + // For territories we use the poverty percentile from the census decennial data + const poveryPercentile = isTerritory ? + properties[constants.CENSUS_DECENNIAL_POVERTY_LESS_THAN_200_FPL_PERCENTILE] : + properties[constants.POVERTY_BELOW_200_PERCENTILE] > 0 ? + properties[constants.POVERTY_BELOW_200_PERCENTILE] : + null; /** * Create the AccoridionItems by mapping over the categories array. In this array we define the * various indicators for a specific category. This is an array which then maps over the @@ -1198,15 +1204,11 @@ const AreaDetail = ({properties}: IAreaDetailProps) => { {showIslandCopy && - } + } {showDonutCopy && 0 ? - properties[constants.POVERTY_BELOW_200_PERCENTILE] : - null - } + povertyBelow200Percentile={poveryPercentile} /> }