From 9ec02bbd3443d50869f38190ef25f4e8caaa4b66 Mon Sep 17 00:00:00 2001 From: Ivan Gabriele Date: Thu, 30 Nov 2023 12:55:20 +0100 Subject: [PATCH] Solve a few TODOs in map regulatory layers --- .../LayersSidebar/RegulatoryZones/RegulatoryTopic.tsx | 4 ---- .../LayersSidebar/RegulatoryZones/RegulatoryZone.tsx | 8 +------- .../MapButtons/LayersSidebar/RegulatoryZones/index.tsx | 2 +- .../RegulatoryZones/metadata/CodeAndName.tsx | 2 -- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryTopic.tsx b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryTopic.tsx index 4c3cc43ba1..1e3727f2e0 100644 --- a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryTopic.tsx +++ b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryTopic.tsx @@ -1,5 +1,3 @@ -// TODO Remove temporary `any`/`as any` and `@ts-ignore` (fresh migration to TS). - import { memo, useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react' import styled from 'styled-components' @@ -167,7 +165,6 @@ function UnmemoizedRegulatoryTopic({ {atLeastOneTopicIsShowed ? ( `. - // @ts-ignore onClick={() => hideTopic(namespace)} style={{ paddingTop: 2 }} title="Cacher la couche" @@ -176,7 +173,6 @@ function UnmemoizedRegulatoryTopic({ `. - // @ts-ignore onClick={() => showTopic(namespace)} style={{ paddingTop: 2 }} title="Afficher la couche" diff --git a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryZone.tsx b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryZone.tsx index b0c5d50cc1..47dfebb9de 100644 --- a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryZone.tsx +++ b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/RegulatoryZone.tsx @@ -1,5 +1,3 @@ -// TODO Remove temporary `any`, `as any` and `@ts-ignore` (fresh migration to TS). - import { memo, useEffect, useState, type Dispatch, type SetStateAction } from 'react' import { useNavigate } from 'react-router-dom' import styled from 'styled-components' @@ -56,7 +54,6 @@ export function showOrHideMetadataIcon( setMetadataIsShown(false) } -// TODO Properly type all these `any`. export type RegulatoryZoneProps = { allowRemoveZone: boolean isEditable: boolean @@ -149,7 +146,6 @@ function UnmemoizedRegulatoryZone({ {isEditable && ( ) : ( @@ -181,7 +176,6 @@ function UnmemoizedRegulatoryZone({ data-cy="regulatory-layers-my-zones-zone-show" onClick={triggerShowRegulatoryZone} style={{ paddingTop: 5 }} - // @ts-ignore title="Afficher la zone" /> )} @@ -200,7 +194,7 @@ function UnmemoizedRegulatoryZone({ } const Rectangle = styled.div<{ - // TODO I don't understand this `ol/Style` type. + // TODO I don't understand this `ol/Style` type. Properly type that. $vectorLayerStyle: any }>` background: ${p => diff --git a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/index.tsx b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/index.tsx index 7a7a03df60..390a1eec8a 100644 --- a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/index.tsx +++ b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/index.tsx @@ -1,4 +1,4 @@ -// TODO Remove temporary `any`/`as any` and `@ts-ignore` (fresh migration to TS). +// TODO Remove temporary `any`/`as any` (fresh migration to TS). import { useCallback, useEffect, useRef, useState } from 'react' import styled from 'styled-components' diff --git a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/metadata/CodeAndName.tsx b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/metadata/CodeAndName.tsx index 1b9ea66fd7..7f92446dfa 100644 --- a/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/metadata/CodeAndName.tsx +++ b/frontend/src/features/MapButtons/LayersSidebar/RegulatoryZones/metadata/CodeAndName.tsx @@ -1,5 +1,3 @@ -// TODO Remove temporary `any`, `as any` and `@ts-ignore` (fresh migration to TS). - import { Label } from './RegulatoryMetadata.style' import { COLORS } from '../../../../../constants/constants' import { InfoPoint } from '../../../../Backoffice/edit_regulation/InfoPoint'