diff --git a/src/app/(campaign)/campanha/(app)/layout.tsx b/src/app/(campaign)/campanha/(app)/layout.tsx index 84e9dd65..724f8b04 100644 --- a/src/app/(campaign)/campanha/(app)/layout.tsx +++ b/src/app/(campaign)/campanha/(app)/layout.tsx @@ -4,6 +4,7 @@ import { redirect } from 'next/navigation' import { getPayload } from 'payload' import React from 'react' +import { CampaignListPendingBoundary } from '@/components/campaign/shared/CampaignListPending' import { BiometricEnrollmentToast, type BiometricEnrollmentOffer, @@ -12,7 +13,6 @@ import { CampaignMobileTopBar } from '@/components/campaign/shell/CampaignMobile import { CampaignSidebar } from '@/components/campaign/shell/CampaignSidebar' import { CampaignSidebarViewportDefault } from '@/components/campaign/shell/CampaignSidebarViewportDefault' import { CampaignWizardChromeProvider } from '@/components/campaign/shell/CampaignWizardChromeContext' -import { CampaignListPendingBoundary } from '@/components/campaign/shared/CampaignListPending' import { InstallPwaToast } from '@/components/campaign/shell/InstallPwaToast' import { SIDEBAR_COOKIE_NAME, diff --git a/src/components/campaign/dashboard/HomeSearchHitRow.tsx b/src/components/campaign/dashboard/HomeSearchHitRow.tsx index b3f24df2..a160fe67 100644 --- a/src/components/campaign/dashboard/HomeSearchHitRow.tsx +++ b/src/components/campaign/dashboard/HomeSearchHitRow.tsx @@ -43,40 +43,40 @@ export const HomeSearchHitRow = ({ } return ( -
- {wizardNavigation ? ( - - - {showPriority ? : null} - - - {primary} - {secondary ? ( - {secondary} - ) : null} - - {trailing ? {trailing} : null} - - ) : ( - - - {showPriority ? : null} - - - {primary} - {secondary ? ( - {secondary} - ) : null} - - {trailing ? {trailing} : null} - - )} - {trailingAction ? {trailingAction} : null} -
+
+ {wizardNavigation ? ( + + + {showPriority ? : null} + + + {primary} + {secondary ? ( + {secondary} + ) : null} + + {trailing ? {trailing} : null} + + ) : ( + + + {showPriority ? : null} + + + {primary} + {secondary ? ( + {secondary} + ) : null} + + {trailing ? {trailing} : null} + + )} + {trailingAction ? {trailingAction} : null} +
) } diff --git a/src/components/campaign/shared/CampaignWizardShell.tsx b/src/components/campaign/shared/CampaignWizardShell.tsx index 0e7c1e6a..6f6f1356 100644 --- a/src/components/campaign/shared/CampaignWizardShell.tsx +++ b/src/components/campaign/shared/CampaignWizardShell.tsx @@ -2,12 +2,12 @@ import { useEffect, useId, useMemo, useRef, type ReactNode } from 'react' +import { CampaignListResults } from '@/components/campaign/shared/CampaignListPending' import { toCampaignWizardChromeState, useSetCampaignWizardChrome, type CampaignWizardChromeSkip, } from '@/components/campaign/shell/CampaignWizardChromeContext' -import { CampaignListResults } from '@/components/campaign/shared/CampaignListPending' import { CAMPAIGN_HOME } from '@/lib/campaignPaths' import { WIZARD_STEP_PENDING_MESSAGE } from '@/lib/campaignWizardCopy' import { cn } from '@/lib/utils' diff --git a/src/components/campaign/shell/CampaignMobileTopBar.tsx b/src/components/campaign/shell/CampaignMobileTopBar.tsx index 5b76c22f..874019cf 100644 --- a/src/components/campaign/shell/CampaignMobileTopBar.tsx +++ b/src/components/campaign/shell/CampaignMobileTopBar.tsx @@ -2,9 +2,9 @@ import { ArrowLeft, X } from 'lucide-react' -import { useCampaignWizardChrome } from '@/components/campaign/shell/CampaignWizardChromeContext' import { useCampaignListTransition } from '@/components/campaign/shared/CampaignListPending' import { CampaignWizardNavLink } from '@/components/campaign/shared/CampaignWizardNavLink' +import { useCampaignWizardChrome } from '@/components/campaign/shell/CampaignWizardChromeContext' import { Button } from '@/components/ui/button' import { SidebarTrigger } from '@/components/ui/Sidebar' import { Skeleton } from '@/components/ui/skeleton' @@ -25,8 +25,7 @@ const wizardDismissButtonClass = const wizardSkipButtonClass = 'min-h-11 max-w-[9rem] px-2 text-primary-foreground hover:bg-primary-foreground/10 hover:text-primary-foreground' -const wizardTitleSkeletonClass = - 'mx-auto motion-reduce:animate-none bg-primary-foreground/20' +const wizardTitleSkeletonClass = 'mx-auto motion-reduce:animate-none bg-primary-foreground/20' export const CampaignMobileTopBar = () => { const chrome = useCampaignWizardChrome() @@ -66,9 +65,7 @@ export const CampaignMobileTopBar = () => { <> {chrome.municipalityLabel ? ( - + ) : null} ) : ( diff --git a/tests/unit/wizardNavigationPending.unit.spec.tsx b/tests/unit/wizardNavigationPending.unit.spec.tsx index 82454220..277dc4ae 100644 --- a/tests/unit/wizardNavigationPending.unit.spec.tsx +++ b/tests/unit/wizardNavigationPending.unit.spec.tsx @@ -15,10 +15,10 @@ vi.mock('next/navigation', async (importActual) => ({ }), })) -import { CampaignMobileTopBar } from '@/components/campaign/shell/CampaignMobileTopBar' -import { CampaignWizardChromeProvider } from '@/components/campaign/shell/CampaignWizardChromeContext' import { CampaignListPendingBoundary } from '@/components/campaign/shared/CampaignListPending' import { CampaignWizardShell } from '@/components/campaign/shared/CampaignWizardShell' +import { CampaignMobileTopBar } from '@/components/campaign/shell/CampaignMobileTopBar' +import { CampaignWizardChromeProvider } from '@/components/campaign/shell/CampaignWizardChromeContext' import { SidebarProvider } from '@/components/ui/Sidebar' import { WIZARD_STEP_PENDING_MESSAGE } from '@/lib/campaignWizardCopy' import { stubMatchMedia } from '../helpers/matchMedia'