diff --git a/front/src/common/Map/Buttons/ButtonMapInfraErrors.tsx b/front/src/common/Map/Buttons/ButtonMapInfraErrors.tsx index 5ffdb06e503..7ba86a334ca 100644 --- a/front/src/common/Map/Buttons/ButtonMapInfraErrors.tsx +++ b/front/src/common/Map/Buttons/ButtonMapInfraErrors.tsx @@ -1,5 +1,3 @@ -import { useState } from 'react'; - import cx from 'classnames'; import { useTranslation } from 'react-i18next'; import { BsExclamationOctagon } from 'react-icons/bs'; @@ -15,21 +13,19 @@ interface ButtonMapInfraErrorsProps { const ButtonMapInfraErrors = ({ editorState }: ButtonMapInfraErrorsProps) => { const dispatch = useAppDispatch(); const { t } = useTranslation('translation'); - const [isActive, setIsActive] = useState(false); const toggleInfraErrors = () => { const newSet = new Set(editorState.editorLayers); if (newSet.has('errors')) newSet.delete('errors'); else newSet.add('errors'); dispatch(editorSliceActions.selectLayers(newSet)); - setIsActive(!isActive); }; return (