From e7d9ca22df0dd5f83cb8cd7e48b7a84726190356 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 2 Aug 2026 21:09:10 +0000 Subject: [PATCH] =?UTF-8?q?Simplify:=20clear=20de=20busca=20s=C3=B3=20no?= =?UTF-8?q?=20overlay=20(open=3Dfalse)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Francisco Solla --- .../campaign/shell/CampaignQuickActionsHost.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/campaign/shell/CampaignQuickActionsHost.tsx b/src/components/campaign/shell/CampaignQuickActionsHost.tsx index d9dd7737..edf0da2d 100644 --- a/src/components/campaign/shell/CampaignQuickActionsHost.tsx +++ b/src/components/campaign/shell/CampaignQuickActionsHost.tsx @@ -3,7 +3,6 @@ import { usePathname } from 'next/navigation' import { useCallback, useEffect, useState, type ReactNode } from 'react' -import { useHomeSearch } from '@/components/campaign/dashboard/HomeSearchContext' import { useCampaignQuickActionContext } from '@/components/campaign/shell/CampaignQuickActionContext' import { CampaignQuickActionsFab } from '@/components/campaign/shell/CampaignQuickActionsFab' import { CampaignQuickActionsOverlay } from '@/components/campaign/shell/CampaignQuickActionsOverlay' @@ -24,22 +23,16 @@ export const CampaignQuickActionsHost = ({ role }: { role: CampaignRole }) => { const pathname = usePathname() const [open, setOpen] = useState(false) const { context } = useCampaignQuickActionContext() - const { clear } = useHomeSearch() const mounted = shouldMountQuickActionsFab(pathname, role) useEffect(() => { setOpen(false) - clear() - }, [pathname, clear]) + }, [pathname]) - const handleOpenChange = useCallback( - (next: boolean) => { - setOpen(next) - if (!next) clear() - }, - [clear], - ) + const handleOpenChange = useCallback((next: boolean) => { + setOpen(next) + }, []) if (!mounted) return null