Skip to content

Commit

Permalink
fix scroll problem
Browse files Browse the repository at this point in the history
  • Loading branch information
anamontiaga committed Apr 11, 2024
1 parent 2552608 commit 0ddee5f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
1 change: 0 additions & 1 deletion client/src/containers/datasets/layers/projects/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
2 changes: 1 addition & 1 deletion client/src/containers/projects/detail/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export default function ProjectDetailPanel() {
<p className="pb-16 text-sm text-gray-500">
If you have pictures of this project to share, please sent them to{' '}
<a className="underline hover:no-underline" href="mailto:[email protected]">
[email protected]
[email protected]
</a>
</p>
</div>
Expand Down
11 changes: 1 addition & 10 deletions client/src/containers/projects/list.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -132,14 +132,6 @@ export default function ProjectsList() {
}
);

const handleHover = useCallback(
(e: MouseEvent<HTMLElement>) => {
const currentValue = e.currentTarget.getAttribute('data-value');
setHoveredProjectList(currentValue);
},
[setHoveredProjectList]
);

const filtersLength = Object.entries(filtersSettings)
.flat()
.filter((el) => typeof el === 'object')
Expand Down Expand Up @@ -199,7 +191,6 @@ export default function ProjectsList() {
type="button"
key={project?.id}
data-value={project?.attributes?.project_code}
onMouseEnter={handleHover}
onMouseLeave={() => setHoveredProjectList(null)}
>
<ProjectItem data={project} />
Expand Down

0 comments on commit 0ddee5f

Please sign in to comment.