Skip to content

Commit

Permalink
fix: eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hrgui committed Apr 7, 2024
1 parent da28949 commit 170bc11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Expand Up @@ -26,6 +26,7 @@ module.exports = {
"import/extensions": 0,
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
"@typescript-eslint/triple-slash-reference": "off",
"@typescript-eslint/no-explicit-any": "off",
},
settings: {
"import/parsers": {
Expand Down
7 changes: 1 addition & 6 deletions src/components/layout/InView.tsx
@@ -1,10 +1,4 @@
/*
const headerEntry = useIntersectionObserver(headerRef, {});
const isHeaderVisible = !!headerEntry?.isIntersecting;
*/

import { useEffect, useRef } from "preact/hooks";

import useIntersectionObserver from "hooks/useIntersectionObserver";

type Props = {
Expand All @@ -21,6 +15,7 @@ const InView = ({ onInView, ...props }: Props) => {
if (isHeaderVisible) {
onInView();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isHeaderVisible]);

return <div ref={ref} {...props} />;
Expand Down

0 comments on commit 170bc11

Please sign in to comment.