Skip to content

Commit

Permalink
Solve a few TODOs in map regulatory layers
Browse files Browse the repository at this point in the history
  • Loading branch information
ivangabriele committed Nov 30, 2023
1 parent 3031fad commit 9ec02bb
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -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'

Expand Down Expand Up @@ -167,7 +165,6 @@ function UnmemoizedRegulatoryTopic({
{atLeastOneTopicIsShowed ? (
<ShowIcon
// TODO Use an `<IconButton />`.
// @ts-ignore
onClick={() => hideTopic(namespace)}
style={{ paddingTop: 2 }}
title="Cacher la couche"
Expand All @@ -176,7 +173,6 @@ function UnmemoizedRegulatoryTopic({
<HideIcon
data-cy="regulatory-layers-my-zones-topic-show"
// TODO Use an `<IconButton />`.
// @ts-ignore
onClick={() => showTopic(namespace)}
style={{ paddingTop: 2 }}
title="Afficher la couche"
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -56,7 +54,6 @@ export function showOrHideMetadataIcon(
setMetadataIsShown(false)
}

// TODO Properly type all these `any`.
export type RegulatoryZoneProps = {
allowRemoveZone: boolean
isEditable: boolean
Expand Down Expand Up @@ -149,7 +146,6 @@ function UnmemoizedRegulatoryZone({
<Icons>
{isEditable && (
<EditIcon
// @ts-ignore
$isOver={isOver}
data-cy="regulatory-layer-zone-edit"
onClick={onEditRegulationClick}
Expand All @@ -173,15 +169,13 @@ function UnmemoizedRegulatoryZone({
data-cy="regulatory-layers-my-zones-zone-hide"
onClick={triggerShowRegulatoryZone}
style={{ paddingTop: 5 }}
// @ts-ignore
title="Cacher la zone"
/>
) : (
<HideIcon
data-cy="regulatory-layers-my-zones-zone-show"
onClick={triggerShowRegulatoryZone}
style={{ paddingTop: 5 }}
// @ts-ignore
title="Afficher la zone"
/>
)}
Expand All @@ -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 =>
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 9ec02bb

Please sign in to comment.