diff --git a/components/campaigns/AnnouncementHero.tsx b/components/campaigns/AnnouncementHero.tsx index 19cea6690953..2c9e2bb07442 100644 --- a/components/campaigns/AnnouncementHero.tsx +++ b/components/campaigns/AnnouncementHero.tsx @@ -21,7 +21,7 @@ interface IAnnouncementHeroProps { export default function AnnouncementHero({ className = '', small = false }: IAnnouncementHeroProps) { const [activeIndex, setActiveIndex] = useState(0); - const visibleBanners = useMemo(() => banners.filter((banner) => shouldShowBanner(banner.cfpDeadline)), [banners]); + const visibleBanners = useMemo(() => banners.filter((banner) => shouldShowBanner(banner.cfpDeadline)), []); const numberOfVisibleBanners = visibleBanners.length; const goToPrevious = () => { diff --git a/components/dashboard/table/Filters.tsx b/components/dashboard/table/Filters.tsx index e9d8a9066c4d..6dca2417022a 100644 --- a/components/dashboard/table/Filters.tsx +++ b/components/dashboard/table/Filters.tsx @@ -39,7 +39,7 @@ function useOutsideAlerter(ref: RefObject, setOpen: (open: boolean) => void // Unbind the event listener on clean up document.removeEventListener('mousedown', handleClickOutside); }; - }, [ref]); + }, [setOpen, ref]); } /** diff --git a/components/navigation/DocsNav.tsx b/components/navigation/DocsNav.tsx index 83bf94294f27..058f806c932e 100644 --- a/components/navigation/DocsNav.tsx +++ b/components/navigation/DocsNav.tsx @@ -76,7 +76,7 @@ export default function DocsNav({ item, active, onClick = () => {} }: DocsNavPro useEffect(() => { setOpenSubCategory(active.startsWith(item.item.slug)); - }, [active]); + }, [active, item.item.slug]); return (
  • diff --git a/components/tools/ToolsCard.tsx b/components/tools/ToolsCard.tsx index a03f01b84dac..082366675a7e 100644 --- a/components/tools/ToolsCard.tsx +++ b/components/tools/ToolsCard.tsx @@ -32,7 +32,7 @@ export default function ToolsCard({ toolData }: ToolsCardProp) { if (descriptionRef.current) { setIsTruncated(descriptionRef.current?.scrollHeight! > descriptionRef.current?.clientHeight!); } - }, [descriptionRef.current]); + }, []); let onGit = false; diff --git a/components/tools/ToolsDashboard.tsx b/components/tools/ToolsDashboard.tsx index 2797b2d2a6d9..a69c136c5973 100644 --- a/components/tools/ToolsDashboard.tsx +++ b/components/tools/ToolsDashboard.tsx @@ -163,7 +163,7 @@ export default function ToolsDashboard() { document.documentElement.style.scrollPaddingTop = '0'; } } - }, []); + }, [toolsList]); // Function to update the list of tools according to the current filters applied const clearFilters = () => { setOpenFilter(false);