teqo-backup/src/components/campaign/dashboard/CampaignHomeActions.tsx
Cursor Agent d5697bcfcb
B110 — wizard return path via allowlisted from query
Propagate return path from quick actions through the B98 wizard chain so
dismiss, skip, and chain end navigate back to the originating page instead
of always redirecting to Início.

Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
2026-08-01 20:39:24 +00:00

23 lines
716 B
TypeScript

'use client'
import { CampaignHomeActionStrip } from '@/components/campaign/dashboard/CampaignHomeActionStrip'
import { homeActionsForRole, toHomeActionButtonProps } from '@/lib/campaignHomeActions'
import { CAMPAIGN_HOME } from '@/lib/campaignPaths'
import type { CampaignRole } from '@/lib/campaignRoles'
export const CampaignHomeActions = ({
role,
uncoveredMunicipalitiesHref,
}: {
role: CampaignRole
uncoveredMunicipalitiesHref?: string
}) => {
const actions = toHomeActionButtonProps(homeActionsForRole(role), {
uncoveredMunicipalitiesHref,
returnPath: CAMPAIGN_HOME,
})
if (actions.length === 0) return null
return <CampaignHomeActionStrip actions={actions} className="w-full" />
}