From 665b1d966fe60e0d1651e6e8fd6a94e9e35641f8 Mon Sep 17 00:00:00 2001 From: Anton Tranelis Date: Tue, 19 Aug 2025 16:16:07 +0200 Subject: [PATCH] fix linting --- lib/src/Components/Map/hooks/useSelectPosition.tsx | 6 +++--- lib/src/Components/Profile/ItemFunctions.spec.tsx | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/Components/Map/hooks/useSelectPosition.tsx b/lib/src/Components/Map/hooks/useSelectPosition.tsx index c166a94c..c0e0b8e0 100644 --- a/lib/src/Components/Map/hooks/useSelectPosition.tsx +++ b/lib/src/Components/Map/hooks/useSelectPosition.tsx @@ -140,7 +140,7 @@ function useSelectPositionManager(): { if (result.success && result.data) { // Find the layer object by ID from server response - const layer = layers.find((l) => l.id === result.data.layer) + const layer = layers.find((l) => l.id === (result.data.layer as unknown as string)) const itemWithLayer = { ...result.data, layer } updateItem(itemWithLayer) await linkItem(updatedItem.id) @@ -176,7 +176,7 @@ function useSelectPositionManager(): { if (result.success && result.data) { // Find the layer object by ID from server response - const layer = layers.find((l) => l.id === result.data.layer) + const layer = layers.find((l) => l.id === (result.data.layer as unknown as string)) const itemWithLayer = { ...result.data, layer } updateItem(itemWithLayer) } @@ -202,7 +202,7 @@ function useSelectPositionManager(): { if (result.success && result.data) { // Find the layer object by ID from server response - const layer = layers.find((l) => l.id === result.data.layer) + const layer = layers.find((l) => l.id === (result.data.layer as unknown as string)) const itemWithLayer = { ...result.data, layer } updateItem(itemWithLayer) } diff --git a/lib/src/Components/Profile/ItemFunctions.spec.tsx b/lib/src/Components/Profile/ItemFunctions.spec.tsx index 71b94c76..edc18aea 100644 --- a/lib/src/Components/Profile/ItemFunctions.spec.tsx +++ b/lib/src/Components/Profile/ItemFunctions.spec.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ import { describe, it, expect, vi } from 'vitest' import { linkItem } from './itemFunctions'