style: prettier after B91 scope trim
This commit is contained in:
parent
83f0b1cf48
commit
2f1e2b7958
3 changed files with 16 additions and 27 deletions
|
|
@ -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 (
|
||||
<HomeSearchProvider value={searchState}>
|
||||
<CampaignStaffGlobalSearchResults />
|
||||
</HomeSearchProvider>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
)
|
||||
}, [])
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue