diff --git a/apps/web/hooks/auth/AuthZ.ts b/apps/web/hooks/auth/AuthZ.ts index 6d46fc8..6425912 100644 --- a/apps/web/hooks/auth/AuthZ.ts +++ b/apps/web/hooks/auth/AuthZ.ts @@ -1,7 +1,8 @@ import { useMemo } from "react"; import { useOrganization, useUserProfile } from "@/lib/api/users"; -import { FeatureName, featureToPlanMap, organizationRoles } from "@/lib/validations/organization"; +import type { FeatureName } from "@/lib/validations/organization"; +import { featureToPlanMap, organizationRoles } from "@/lib/validations/organization"; import { type Team, teamRoles } from "@/lib/validations/team"; interface Options { @@ -40,6 +41,7 @@ export function useAuthZ(options: Options = {}) { const isAppFeatureEnabled = (feature: FeatureName) => { const organizationPlan = organization?.plan_name; const plansEnabled = featureToPlanMap[feature]; + // eslint-disable-next-line @typescript-eslint/no-explicit-any if (organizationPlan && plansEnabled && plansEnabled.includes(organizationPlan as any)) { return true; } diff --git a/apps/web/lib/transformers/layer.ts b/apps/web/lib/transformers/layer.ts index ba9d0f0..2f748d4 100644 --- a/apps/web/lib/transformers/layer.ts +++ b/apps/web/lib/transformers/layer.ts @@ -1,6 +1,5 @@ import type { MapGeoJSONFeature } from "react-map-gl/maplibre"; -import { MARKER_IMAGE_PREFIX } from "@/lib/transformers/map-image"; import { rgbToHex } from "@/lib/utils/helpers"; import type { FeatureLayerLineProperties, FeatureLayerPointProperties, Layer } from "@/lib/validations/layer"; import type { ProjectLayer } from "@/lib/validations/project"; @@ -130,7 +129,7 @@ export function getMapboxStyleMarker(data: ProjectLayer | Layer) { const markerMaps = properties.marker_mapping; const fieldName = properties.marker_field?.name; const fieldType = properties.marker_field?.type; - const marker = `${MARKER_IMAGE_PREFIX}${properties.marker?.name}`; + const marker = `${data.id}-${properties.marker?.name}`; if (markerMaps && fieldName) { const valuesAndIcons = [] as (string | number)[]; markerMaps.forEach((markerMap) => { @@ -144,7 +143,7 @@ export function getMapboxStyleMarker(data: ProjectLayer | Layer) { } else { valuesAndIcons.push(value); } - valuesAndIcons.push(`${MARKER_IMAGE_PREFIX}${markerMapIcon.name}`); + valuesAndIcons.push(`${data.id}-${markerMapIcon.name}`); }); } else { if (fieldType === "number" && markerMapValue !== null) { @@ -152,7 +151,7 @@ export function getMapboxStyleMarker(data: ProjectLayer | Layer) { } else { valuesAndIcons.push(markerMapValue); } - valuesAndIcons.push(`${MARKER_IMAGE_PREFIX}${markerMapIcon.name}`); + valuesAndIcons.push(`${data.id}-${markerMapIcon.name}`); } });