diff --git a/src/components/campaign/dashboard/CampaignStaffGlobalSearch.tsx b/src/components/campaign/dashboard/CampaignStaffGlobalSearch.tsx index 9eede09c..3a0e506d 100644 --- a/src/components/campaign/dashboard/CampaignStaffGlobalSearch.tsx +++ b/src/components/campaign/dashboard/CampaignStaffGlobalSearch.tsx @@ -14,7 +14,6 @@ import { import { HomeSearchResultsLayout } from '@/components/campaign/dashboard/HomeSearchResultsLayout' import { HomeSearchResultsShell } from '@/components/campaign/dashboard/HomeSearchResultsShell' import { HomeSearchStateDeputyGroup } from '@/components/campaign/dashboard/HomeSearchStateDeputyGroup' -import { useHomeSearchQuery } from '@/components/campaign/dashboard/useHomeSearchQuery' const CampaignStaffGlobalSearchResults = () => { const searchResultsState = useHomeSearchResultsState() @@ -39,14 +38,3 @@ const CampaignStaffGlobalSearchResults = () => { /** Result groups + input — requires an ancestor `HomeSearchProvider`. */ export const CampaignStaffGlobalSearchBody = CampaignStaffGlobalSearchResults - -/** Staff global search — same contract as Início (`POST /campanha/home-search`). */ -export const CampaignStaffGlobalSearch = () => { - const searchState = useHomeSearchQuery() - - return ( - - - - ) -} diff --git a/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx b/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx index 4435dccc..537c95a3 100644 --- a/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx +++ b/src/components/campaign/shell/CampaignQuickActionsDrawer.tsx @@ -3,11 +3,7 @@ import { useCallback, useState } from 'react' import { CampaignHomeActionStrip } from '@/components/campaign/dashboard/CampaignHomeActionStrip' -import { - Drawer, - DrawerContent, - DrawerTitle, -} from '@/components/ui/Drawer' +import { Drawer, DrawerContent, DrawerTitle } from '@/components/ui/Drawer' import type { ResolvedCampaignHomeAction } from '@/lib/campaignHomeActions' import { QUICK_ACTIONS_SNAP_COLLAPSED, @@ -31,17 +27,22 @@ export const CampaignQuickActionsDrawer = ({ const expanded = quickActionsSnapIsExpanded(snapPoint) const showActions = actions.length > 0 - const handleSnapPointChange = useCallback((next: QuickActionsSnapPoint | string | number | null) => { - if (next === QUICK_ACTIONS_SNAP_COLLAPSED || next === QUICK_ACTIONS_SNAP_EXPANDED) { - setSnapPoint(next) - return - } - setSnapPoint(QUICK_ACTIONS_SNAP_COLLAPSED) - }, []) + const handleSnapPointChange = useCallback( + (next: QuickActionsSnapPoint | string | number | null) => { + if (next === QUICK_ACTIONS_SNAP_COLLAPSED || next === QUICK_ACTIONS_SNAP_EXPANDED) { + setSnapPoint(next) + return + } + setSnapPoint(QUICK_ACTIONS_SNAP_COLLAPSED) + }, + [], + ) const toggleSnap = useCallback(() => { setSnapPoint((current) => - quickActionsSnapIsExpanded(current) ? QUICK_ACTIONS_SNAP_COLLAPSED : QUICK_ACTIONS_SNAP_EXPANDED, + quickActionsSnapIsExpanded(current) + ? QUICK_ACTIONS_SNAP_COLLAPSED + : QUICK_ACTIONS_SNAP_EXPANDED, ) }, []) diff --git a/src/components/campaign/shell/CampaignQuickActionsHost.tsx b/src/components/campaign/shell/CampaignQuickActionsHost.tsx index f24cc124..0de35088 100644 --- a/src/components/campaign/shell/CampaignQuickActionsHost.tsx +++ b/src/components/campaign/shell/CampaignQuickActionsHost.tsx @@ -3,11 +3,11 @@ import { usePathname } from 'next/navigation' import type { ReactNode } from 'react' -import { CampaignQuickActionsDrawer } from '@/components/campaign/shell/CampaignQuickActionsDrawer' import { useCampaignQuickActionContext } from '@/components/campaign/shell/CampaignQuickActionContext' +import { CampaignQuickActionsDrawer } from '@/components/campaign/shell/CampaignQuickActionsDrawer' import { useIsMobile } from '@/hooks/use-mobile' -import { resolveQuickActionsForPath } from '@/lib/campaignQuickActionRegistry' import { shouldMountQuickActionsDrawer } from '@/lib/campaignQuickActionMount' +import { resolveQuickActionsForPath } from '@/lib/campaignQuickActionRegistry' import { QUICK_ACTIONS_SNAP_COLLAPSED } from '@/lib/campaignQuickActionSnap' import type { CampaignRole } from '@/lib/campaignRoles' import { cn } from '@/lib/utils'