From 0ddee5fcf935d3620dd26c48bc9f861016293474 Mon Sep 17 00:00:00 2001 From: anamontiaga Date: Thu, 11 Apr 2024 10:17:44 +0200 Subject: [PATCH 1/5] fix scroll problem --- .../src/containers/datasets/layers/projects/hooks.tsx | 1 - client/src/containers/projects/detail/panel.tsx | 2 +- client/src/containers/projects/list.tsx | 11 +---------- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/client/src/containers/datasets/layers/projects/hooks.tsx b/client/src/containers/datasets/layers/projects/hooks.tsx index ee0ed90c..d800c6b6 100644 --- a/client/src/containers/datasets/layers/projects/hooks.tsx +++ b/client/src/containers/datasets/layers/projects/hooks.tsx @@ -3,7 +3,6 @@ import { useState } from 'react'; import type { LayerProps } from 'react-map-gl'; import { useAtomValue } from 'jotai'; -import { useSetAtom } from 'jotai'; import { hoveredProjectMapAtom } from '@/store'; diff --git a/client/src/containers/projects/detail/panel.tsx b/client/src/containers/projects/detail/panel.tsx index 899f4357..8634e3eb 100644 --- a/client/src/containers/projects/detail/panel.tsx +++ b/client/src/containers/projects/detail/panel.tsx @@ -288,7 +288,7 @@ export default function ProjectDetailPanel() {

If you have pictures of this project to share, please sent them to{' '} - email@afoco.com + contact@afocosec.org

diff --git a/client/src/containers/projects/list.tsx b/client/src/containers/projects/list.tsx index 5e0c1482..fc8190f1 100644 --- a/client/src/containers/projects/list.tsx +++ b/client/src/containers/projects/list.tsx @@ -1,6 +1,6 @@ 'use client'; -import { useCallback, useState, MouseEvent } from 'react'; +import { useState } from 'react'; import { useSetAtom } from 'jotai'; import { Search, X } from 'lucide-react'; @@ -132,14 +132,6 @@ export default function ProjectsList() { } ); - const handleHover = useCallback( - (e: MouseEvent) => { - const currentValue = e.currentTarget.getAttribute('data-value'); - setHoveredProjectList(currentValue); - }, - [setHoveredProjectList] - ); - const filtersLength = Object.entries(filtersSettings) .flat() .filter((el) => typeof el === 'object') @@ -199,7 +191,6 @@ export default function ProjectsList() { type="button" key={project?.id} data-value={project?.attributes?.project_code} - onMouseEnter={handleHover} onMouseLeave={() => setHoveredProjectList(null)} > From 374be87ba8e1f1f801777d8fed673d884aae8aca Mon Sep 17 00:00:00 2001 From: anamontiaga Date: Thu, 11 Apr 2024 10:19:44 +0200 Subject: [PATCH 2/5] fix search close brn on countries searcher --- client/src/containers/countries/list.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/containers/countries/list.tsx b/client/src/containers/countries/list.tsx index 974dc160..2b4837ff 100644 --- a/client/src/containers/countries/list.tsx +++ b/client/src/containers/countries/list.tsx @@ -39,7 +39,7 @@ export default function CountriesList() { {!!searchValue && (