mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 10:04: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 (
|
return (
|
||||||
<aside className={styles.areaDetailContainer} data-cy={'aside'}>
|
<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 ? (
|
isCensusLayerSelected ? (
|
||||||
<>
|
<>
|
||||||
{/* Census Info */}
|
{/* Tract Info */}
|
||||||
<ul className={styles.censusRow}>
|
<TractInfo
|
||||||
<li>
|
blockGroup={blockGroup}
|
||||||
<span className={styles.censusLabel}>
|
countyName={countyName}
|
||||||
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.CENSUS_BLOCK_GROUP)}
|
stateName={stateName}
|
||||||
</span>
|
population={population}
|
||||||
<span className={styles.censusText}>{` ${blockGroup}`}</span>
|
sidePanelState={properties[constants.SIDE_PANEL_STATE]}
|
||||||
</li>
|
/>
|
||||||
<li>
|
|
||||||
<span className={styles.censusLabel}>
|
{/* Demographics */}
|
||||||
{intl.formatMessage(EXPLORE_COPY.SIDE_PANEL_CBG_INFO.COUNTY)}
|
<TractDemographics />
|
||||||
</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? */}
|
{/* Disadvantaged? */}
|
||||||
<div className={styles.categorization}>
|
<div className={styles.categorization}>
|
||||||
|
|
|
@ -195,40 +195,6 @@ exports[`rendering of the AreaDetail checks if indicators for ISLAND AREAS are p
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</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>
|
||||||
<div>
|
<div>
|
||||||
Identified as disadvantaged?
|
Identified as disadvantaged?
|
||||||
|
@ -746,40 +712,6 @@ exports[`rendering of the AreaDetail checks if indicators for NATION is present
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</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>
|
||||||
<div>
|
<div>
|
||||||
Identified as disadvantaged?
|
Identified as disadvantaged?
|
||||||
|
@ -2850,40 +2782,6 @@ exports[`rendering of the AreaDetail checks if indicators for PUERTO RICO are pr
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</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>
|
||||||
<div>
|
<div>
|
||||||
Identified as disadvantaged?
|
Identified as disadvantaged?
|
||||||
|
|
|
@ -431,7 +431,7 @@ const J40Map = ({location}: IJ40Interface) => {
|
||||||
{intl.formatMessage(EXPLORE_COPY.MAP.GEOLOC_MSG_LOCATING)}
|
{intl.formatMessage(EXPLORE_COPY.MAP.GEOLOC_MSG_LOCATING)}
|
||||||
</div>}
|
</div>}
|
||||||
|
|
||||||
<div className={styles.geolocateIcon}>
|
<div>
|
||||||
<GeolocateControl
|
<GeolocateControl
|
||||||
positionOptions={{enableHighAccuracy: true}}
|
positionOptions={{enableHighAccuracy: true}}
|
||||||
onGeolocate={onGeolocate}
|
onGeolocate={onGeolocate}
|
||||||
|
|
|
@ -96,7 +96,6 @@ const MapTribalLayer = ({
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Alaska layer */}
|
{/* Alaska layer */}
|
||||||
{/* // Todo: limit zoom in amount */}
|
|
||||||
<Layer
|
<Layer
|
||||||
id={constants.TRIBAL_ALASKA_POINTS_LAYER_ID}
|
id={constants.TRIBAL_ALASKA_POINTS_LAYER_ID}
|
||||||
source-layer={constants.TRIBAL_SOURCE_LAYER}
|
source-layer={constants.TRIBAL_SOURCE_LAYER}
|
||||||
|
|
Loading…
Add table
Reference in a new issue