style: prettier
This commit is contained in:
parent
6c8d7d418c
commit
90a97d3c76
5 changed files with 42 additions and 45 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -43,40 +43,40 @@ export const HomeSearchHitRow = ({
|
|||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
HOME_SEARCH_HIT_ROW_WRAPPER_CLASS,
|
||||
trailingAction ? 'flex items-center gap-0' : undefined,
|
||||
)}
|
||||
>
|
||||
{wizardNavigation ? (
|
||||
<CampaignWizardNavLink {...rowLinkProps}>
|
||||
<span className={HOME_SEARCH_PRIORITY_ICON_SLOT_CLASS} aria-hidden={!showPriority}>
|
||||
{showPriority ? <MunicipalityPriorityIndicator /> : null}
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block truncate font-medium">{primary}</span>
|
||||
{secondary ? (
|
||||
<span className="block truncate text-xs text-muted-foreground">{secondary}</span>
|
||||
) : null}
|
||||
</span>
|
||||
{trailing ? <span className="shrink-0">{trailing}</span> : null}
|
||||
</CampaignWizardNavLink>
|
||||
) : (
|
||||
<Link {...rowLinkProps}>
|
||||
<span className={HOME_SEARCH_PRIORITY_ICON_SLOT_CLASS} aria-hidden={!showPriority}>
|
||||
{showPriority ? <MunicipalityPriorityIndicator /> : null}
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block truncate font-medium">{primary}</span>
|
||||
{secondary ? (
|
||||
<span className="block truncate text-xs text-muted-foreground">{secondary}</span>
|
||||
) : null}
|
||||
</span>
|
||||
{trailing ? <span className="shrink-0">{trailing}</span> : null}
|
||||
</Link>
|
||||
)}
|
||||
{trailingAction ? <span className="shrink-0">{trailingAction}</span> : null}
|
||||
</div>
|
||||
<div
|
||||
className={cn(
|
||||
HOME_SEARCH_HIT_ROW_WRAPPER_CLASS,
|
||||
trailingAction ? 'flex items-center gap-0' : undefined,
|
||||
)}
|
||||
>
|
||||
{wizardNavigation ? (
|
||||
<CampaignWizardNavLink {...rowLinkProps}>
|
||||
<span className={HOME_SEARCH_PRIORITY_ICON_SLOT_CLASS} aria-hidden={!showPriority}>
|
||||
{showPriority ? <MunicipalityPriorityIndicator /> : null}
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block truncate font-medium">{primary}</span>
|
||||
{secondary ? (
|
||||
<span className="block truncate text-xs text-muted-foreground">{secondary}</span>
|
||||
) : null}
|
||||
</span>
|
||||
{trailing ? <span className="shrink-0">{trailing}</span> : null}
|
||||
</CampaignWizardNavLink>
|
||||
) : (
|
||||
<Link {...rowLinkProps}>
|
||||
<span className={HOME_SEARCH_PRIORITY_ICON_SLOT_CLASS} aria-hidden={!showPriority}>
|
||||
{showPriority ? <MunicipalityPriorityIndicator /> : null}
|
||||
</span>
|
||||
<span className="min-w-0 flex-1">
|
||||
<span className="block truncate font-medium">{primary}</span>
|
||||
{secondary ? (
|
||||
<span className="block truncate text-xs text-muted-foreground">{secondary}</span>
|
||||
) : null}
|
||||
</span>
|
||||
{trailing ? <span className="shrink-0">{trailing}</span> : null}
|
||||
</Link>
|
||||
)}
|
||||
{trailingAction ? <span className="shrink-0">{trailingAction}</span> : null}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
|||
<>
|
||||
<Skeleton className={cn(wizardTitleSkeletonClass, 'h-4 w-32 max-w-full')} />
|
||||
{chrome.municipalityLabel ? (
|
||||
<Skeleton
|
||||
className={cn(wizardTitleSkeletonClass, 'mt-1 h-3 w-24 max-w-full')}
|
||||
/>
|
||||
<Skeleton className={cn(wizardTitleSkeletonClass, 'mt-1 h-3 w-24 max-w-full')} />
|
||||
) : null}
|
||||
</>
|
||||
) : (
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue