diff --git a/app/comparison/card/ViewportLogger.tsx b/app/comparison/card/ViewportLogger.tsx index 0c096e1..a61085f 100644 --- a/app/comparison/card/ViewportLogger.tsx +++ b/app/comparison/card/ViewportLogger.tsx @@ -9,7 +9,7 @@ interface Props { const ViewportLogger: React.FC = ({ children, handleLogic, trigger }) => { const containerRef = useRef(null); - const [visibleIds, setVisibleIds] = useState([]); + const [_visibleIds, setVisibleIds] = useState([]); useDidUpdateEffect(() => { // eslint-disable-next-line no-undef @@ -31,7 +31,7 @@ const ViewportLogger: React.FC = ({ children, handleLogic, trigger }) => } }); - setVisibleIds((prevIds) => { + setVisibleIds(() => { const updatedIds = Array.from(new Set([...newVisibleIds])); handleLogic(updatedIds); return updatedIds;