Skip to content

Commit

Permalink
fix: type issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ganesh Agrawal committed Jan 6, 2025
1 parent 10bb55f commit 2e70d8b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admin/src/components/Layouts/HeaderLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const useElementOnScreen = <TElement extends HTMLElement = HTMLElement>(
const observer = new IntersectionObserver(callback, options);

if (containerEl) {
observer.observe(containerRef.current);
observer.observe(containerRef.current as TElement);
}

return () => {
Expand All @@ -163,7 +163,7 @@ const useElementOnScreen = <TElement extends HTMLElement = HTMLElement>(
};
}, [containerRef, options]);

return [containerRef, isVisible];
return [containerRef as React.RefObject<TElement>, isVisible];
};

/**
Expand Down

0 comments on commit 2e70d8b

Please sign in to comment.