Skip to content

Commit

Permalink
zone -> shape
Browse files Browse the repository at this point in the history
  • Loading branch information
conbrad committed Nov 1, 2023
1 parent a27664a commit 85d6cd9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions web/src/features/fba/components/ZoneSummaryPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ interface Props {
selectedFireZone: FireShape | undefined
fuelTypeInfo: Record<number, FireZoneThresholdFuelTypeArea[]>
hfiElevationInfo: ElevationInfoByThreshold[]
fireZoneAreas: FireShapeArea[]
fireShapeAreas: FireShapeArea[]
showSummaryPanel: boolean
setShowSummaryPanel: React.Dispatch<React.SetStateAction<boolean>>
}
Expand Down Expand Up @@ -63,7 +63,7 @@ const ZoneSummaryPanel = React.forwardRef((props: Props, ref: React.ForwardedRef
</Grid>
<Grid item>
<CombustibleAreaViz
fireZoneAreas={props.fireZoneAreas.filter(
fireZoneAreas={props.fireShapeAreas.filter(
area => area.fire_shape_id == props.selectedFireZone?.fire_shape_id
)}
/>
Expand Down
2 changes: 1 addition & 1 deletion web/src/features/fba/components/map/FBAMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ const FBAMap = (props: FBAMapProps) => {
<Box sx={{ position: 'absolute', zIndex: '1', bottom: '0.5rem' }}>
<Legend
onToggleLayer={handleToggleLayer}
showZoneStatus={showShapeStatus}
showShapeStatus={showShapeStatus}
setShowShapeStatus={setShowShapeStatus}
showHFI={showHFI}
setShowHFI={setShowHFI}
Expand Down
10 changes: 5 additions & 5 deletions web/src/features/fba/components/map/Legend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,13 @@ const LegendItem: React.FC<LegendItemProps> = ({ label, checked, onChange, subIt

interface LegendProps {
onToggleLayer: (layerName: string, isVisible: boolean) => void
showZoneStatus: boolean
showShapeStatus: boolean
setShowShapeStatus: React.Dispatch<React.SetStateAction<boolean>>
showHFI: boolean
setShowHFI: React.Dispatch<React.SetStateAction<boolean>>
}

const Legend = ({ onToggleLayer, showZoneStatus, setShowShapeStatus, showHFI, setShowHFI }: LegendProps) => {
const Legend = ({ onToggleLayer, showShapeStatus, setShowShapeStatus, showHFI, setShowHFI }: LegendProps) => {
const handleLayerChange = (
layerName: string,
isVisible: boolean,
Expand All @@ -106,9 +106,9 @@ const Legend = ({ onToggleLayer, showZoneStatus, setShowShapeStatus, showHFI, se
BC Fire Advisories
</LegendTitle>
<LegendItem
label="Zone Status"
checked={showZoneStatus}
onChange={() => handleLayerChange('fireShapeVector', showZoneStatus, setShowShapeStatus)}
label="Zone Unit Status"
checked={showShapeStatus}
onChange={() => handleLayerChange('fireShapeVector', showShapeStatus, setShowShapeStatus)}
subItems={zoneStatusSubItems}
/>
<LegendItem
Expand Down
4 changes: 2 additions & 2 deletions web/src/features/fba/components/map/legend.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Legend', () => {
setShowShapeStatus={setShowZoneStatus}
setShowHFI={setShowHFI}
showHFI={false}
showZoneStatus={true}
showShapeStatus={true}
/>
)
const legendComponent = getByTestId('asa-map-legend')
Expand All @@ -41,7 +41,7 @@ describe('Legend', () => {
setShowShapeStatus={setShowZoneStatus}
setShowHFI={setShowHFI}
showHFI={false}
showZoneStatus={true}
showShapeStatus={true}
/>
)

Expand Down
2 changes: 1 addition & 1 deletion web/src/features/fba/pages/FireBehaviourAdvisoryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ const FireBehaviourAdvisoryPage: React.FunctionComponent = () => {
selectedFireZone={selectedFireZone}
fuelTypeInfo={hfiThresholdsFuelTypes}
hfiElevationInfo={fireZoneElevationInfo}
fireZoneAreas={fireShapeAreas}
fireShapeAreas={fireShapeAreas}
showSummaryPanel={showSummaryPanel}
setShowSummaryPanel={setShowSummaryPanel}
/>
Expand Down

0 comments on commit 85d6cd9

Please sign in to comment.