Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahdigh committed Sep 23, 2024
1 parent 3f670bc commit ac0a2ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/comparison/card/ViewportLogger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface Props {

const ViewportLogger: React.FC<Props> = ({ children, handleLogic, trigger }) => {
const containerRef = useRef<HTMLDivElement>(null);
const [visibleIds, setVisibleIds] = useState<string[]>([]);
const [_visibleIds, setVisibleIds] = useState<string[]>([]);

useDidUpdateEffect(() => {
// eslint-disable-next-line no-undef
Expand All @@ -31,7 +31,7 @@ const ViewportLogger: React.FC<Props> = ({ children, handleLogic, trigger }) =>
}
});

setVisibleIds((prevIds) => {
setVisibleIds(() => {
const updatedIds = Array.from(new Set([...newVisibleIds]));
handleLogic(updatedIds);
return updatedIds;
Expand Down

0 comments on commit ac0a2ff

Please sign in to comment.