mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 01:54:18 -08:00
Show Tract info/demo only when tracts are selected
This commit is contained in:
parent
908d712144
commit
79d50e9cb4
4 changed files with 12 additions and 148 deletions
|
@ -628,53 +628,20 @@ const AreaDetail = ({properties, hash, isCensusLayerSelected}: IAreaDetailProps)
|
|||
|
||||
return (
|
||||
<aside className={styles.areaDetailContainer} data-cy={'aside'}>
|
||||
|
||||
{/* Tract Info */}
|
||||
<TractInfo
|
||||
blockGroup={blockGroup}
|
||||
countyName={countyName}
|
||||
stateName={stateName}
|
||||
population={population}
|
||||
sidePanelState={properties[constants.SIDE_PANEL_STATE]}
|
||||
/>
|
||||
|
||||
{/* 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>
|
||||
{/* Tract Info */}
|
||||
<TractInfo
|
||||
blockGroup={blockGroup}
|
||||
countyName={countyName}
|
||||
stateName={stateName}
|
||||
population={population}
|
||||
sidePanelState={properties[constants.SIDE_PANEL_STATE]}
|
||||
/>
|
||||
|
||||
{/* Demographics */}
|
||||
<TractDemographics />
|
||||
|
||||
{/* Disadvantaged? */}
|
||||
<div className={styles.categorization}>
|
||||
|
|
|
@ -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?
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Reference in a new issue