Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel committed Mar 13, 2024
1 parent fb3e2e7 commit 64b4207
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { HeatmapLayerMeta } from '@globalfishingwatch/layer-composer'
import { getEnvironmentalDatasetRange } from '@globalfishingwatch/datasets-client'
import { useMapBounds } from 'features/map/map-bounds.hooks'
import { areDataviewsFeatureLoaded, useMapDataviewFeatures } from 'features/map/map-sources.hooks'
import type { GeoJSONFeature } from '@globalfishingwatch/maplibre-gl'

export const useDataviewHistogram = (dataview: UrlDataviewInstance) => {
const { bounds } = useMapBounds()
Expand All @@ -29,7 +30,7 @@ export const useDataviewHistogram = (dataview: UrlDataviewInstance) => {
(layerFeature: LayerFeature, bounds: MiniglobeBounds) => {
const { features } = layerFeature.chunksFeatures?.[0] || ({} as ChunkFeature)
if (features && features.length) {
const filteredFeatures = filterFeaturesByBounds(features, bounds)
const filteredFeatures = filterFeaturesByBounds(features, bounds) as GeoJSONFeature[]
const rawData = aggregateFeatures(
filteredFeatures,
layerFeature.metadata as HeatmapLayerMeta
Expand Down
3 changes: 2 additions & 1 deletion apps/fishing-map/features/workspace/events/events.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from 'features/map/map-sources.hooks'
import { useViewStateAtom } from 'features/map/map-viewport.hooks'
import { useMapBounds } from 'features/map/map-bounds.hooks'
import type { GeoJSONFeature } from '@globalfishingwatch/maplibre-gl'

export const useEventsDynamicRamp = (dataview: UrlDataviewInstance) => {
const { bounds } = useMapBounds()
Expand All @@ -22,7 +23,7 @@ export const useEventsDynamicRamp = (dataview: UrlDataviewInstance) => {

const updateBreaksByViewportValues = useCallback(
({ features, dataviewsId } = {} as DataviewFeature, bounds: MiniglobeBounds) => {
const filteredFeatures = filterFeaturesByBounds(features, bounds)
const filteredFeatures = filterFeaturesByBounds(features, bounds) as GeoJSONFeature[]
if (filteredFeatures?.length > 0) {
const data = filteredFeatures.map((feature) => feature.properties?.count)
const steps = Math.min(data.length, 3)
Expand Down

0 comments on commit 64b4207

Please sign in to comment.