Show Tract info/demo only when tracts are selected

This commit is contained in:
Vim USDS 2022-08-17 16:59:11 -07:00
parent 908d712144
commit 79d50e9cb4
4 changed files with 12 additions and 148 deletions

View file

@ -628,7 +628,9 @@ const AreaDetail = ({properties, hash, isCensusLayerSelected}: IAreaDetailProps)
return (
<aside className={styles.areaDetailContainer} data-cy={'aside'}>
{
isCensusLayerSelected ? (
<>
{/* Tract Info */}
<TractInfo
blockGroup={blockGroup}
@ -641,41 +643,6 @@ const AreaDetail = ({properties, hash, isCensusLayerSelected}: IAreaDetailProps)
{/* Demographics */}
<TractDemographics />
{
isCensusLayerSelected ? (
<>
{/* Census Info */}
<ul className={styles.censusRow}>
<li>
<span className={styles.censusLabel}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.CENSUS_BLOCK_GROUP)}
</span>
<span className={styles.censusText}>{` ${blockGroup}`}</span>
</li>
<li>
<span className={styles.censusLabel}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.COUNTY)}
</span>
<span className={styles.censusText}>{` ${countyName}`}</span>
</li>
<li>
<span className={styles.censusLabel}>
{properties[constants.SIDE_PANEL_STATE] !== constants.SIDE_PANEL_STATE_VALUES.NATION ?
intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.TERRITORY) :
intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.STATE)
}
</span>
<span className={styles.censusText}>{` ${stateName}`}</span>
</li>
<li>
<span className={styles.censusLabel}>
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.POPULATION)}
</span>
<span className={styles.censusText}>{` ${population.toLocaleString()}`}</span>
</li>
</ul>
{/* Disadvantaged? */}
<div className={styles.categorization}>

View file

@ -195,40 +195,6 @@ exports[`rendering of the AreaDetail checks if indicators for ISLAND AREAS are p
</div>
</section>
</div>
<ul>
<li>
<span>
Number:
</span>
<span>
98729374234
</span>
</li>
<li>
<span>
County:
</span>
<span>
Brooklyn
</span>
</li>
<li>
<span>
Territory:
</span>
<span>
New York
</span>
</li>
<li>
<span>
Population:
</span>
<span>
3,435,435
</span>
</li>
</ul>
<div>
<div>
Identified as disadvantaged?
@ -746,40 +712,6 @@ exports[`rendering of the AreaDetail checks if indicators for NATION is present
</div>
</section>
</div>
<ul>
<li>
<span>
Number:
</span>
<span>
98729374234
</span>
</li>
<li>
<span>
County:
</span>
<span>
Brooklyn
</span>
</li>
<li>
<span>
State:
</span>
<span>
New York
</span>
</li>
<li>
<span>
Population:
</span>
<span>
3,435,435
</span>
</li>
</ul>
<div>
<div>
Identified as disadvantaged?
@ -2850,40 +2782,6 @@ exports[`rendering of the AreaDetail checks if indicators for PUERTO RICO are pr
</div>
</section>
</div>
<ul>
<li>
<span>
Number:
</span>
<span>
98729374234
</span>
</li>
<li>
<span>
County:
</span>
<span>
Brooklyn
</span>
</li>
<li>
<span>
Territory:
</span>
<span>
New York
</span>
</li>
<li>
<span>
Population:
</span>
<span>
3,435,435
</span>
</li>
</ul>
<div>
<div>
Identified as disadvantaged?

View file

@ -431,7 +431,7 @@ const J40Map = ({location}: IJ40Interface) => {
{intl.formatMessage(EXPLORE_COPY.MAP.GEOLOC_MSG_LOCATING)}
</div>}
<div className={styles.geolocateIcon}>
<div>
<GeolocateControl
positionOptions={{enableHighAccuracy: true}}
onGeolocate={onGeolocate}

View file

@ -96,7 +96,6 @@ const MapTribalLayer = ({
/>
{/* Alaska layer */}
{/* // Todo: limit zoom in amount */}
<Layer
id={constants.TRIBAL_ALASKA_POINTS_LAYER_ID}
source-layer={constants.TRIBAL_SOURCE_LAYER}