Skip to content

Commit

Permalink
[Tech] add typing
Browse files Browse the repository at this point in the history
  • Loading branch information
claire2212 committed Dec 9, 2024
1 parent 443282d commit 768dc82
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/features/Dashboard/components/Layers/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,14 @@ import { getRegulatoryLayerStyle } from '@features/map/layers/styles/administrat
import { editingReportingStyleFn } from '@features/Reportings/components/ReportingLayer/Reporting/style'
import { getVigilanceAreaLayerStyle } from '@features/VigilanceArea/components/VigilanceAreaLayer/style'

export const getDashboardStyle = feature => {
const featureType = feature.getId().split(':')[0]
import type { FeatureLike } from 'ol/Feature'

export const getDashboardStyle = (feature: FeatureLike) => {
const featureId = String(feature.getId())
if (!featureId) {
return undefined
}
const featureType = featureId.split(':')[0]

if (featureType === Dashboard.Layer.DASHBOARD_REGULATORY_AREAS) {
return getRegulatoryLayerStyle(feature)
Expand Down

0 comments on commit 768dc82

Please sign in to comment.