Format B135 wizard back navigation files

This commit is contained in:
Cursor Agent 2026-08-02 23:05:09 +00:00
parent 28525aab4b
commit 989e3abab8
No known key found for this signature in database
4 changed files with 12 additions and 11 deletions

View file

@ -61,9 +61,7 @@ export const WizardTrendNoteStep = ({
useCampaignFormSuccessToast(state, () => {
recordLastActedMunicipality(municipalitySlug)
const sessionEntry = resolveWizardChainEntry(entryAction, 'change-trend')
router.push(
wizardChainContinueHref(sessionEntry, 'change-trend', municipalitySlug, returnPath),
)
router.push(wizardChainContinueHref(sessionEntry, 'change-trend', municipalitySlug, returnPath))
})
return (

View file

@ -85,9 +85,7 @@ export const WizardExpectedVotesStep = ({
const continueAfterVotes = () => {
const sessionEntry = resolveWizardChainEntry(entryAction, 'update-votes')
router.push(
wizardChainContinueHref(sessionEntry, 'update-votes', municipalitySlug, returnPath),
)
router.push(wizardChainContinueHref(sessionEntry, 'update-votes', municipalitySlug, returnPath))
}
const handleConfirm = () => {

View file

@ -6,11 +6,11 @@
import {
CAMPAIGN_WIZARD_ACTION_SLUGS,
campaignWizardActionIdForSlug,
type CampaignWizardActionId,
isWizardReturnPath,
wizardActionHref,
wizardSignalHref,
wizardTrendHref,
type CampaignWizardActionId,
} from '@/lib/campaignActionRoutes'
import { CAMPAIGN_HOME } from '@/lib/campaignPaths'
@ -198,7 +198,14 @@ export const wizardPreviousHref = (input: WizardPreviousHrefInput): string => {
}
if (stepKind === 'trend-note') {
return wizardTrendHref(actionSlug, municipalitySlug, undefined, entryAction, undefined, returnPath)
return wizardTrendHref(
actionSlug,
municipalitySlug,
undefined,
entryAction,
undefined,
returnPath,
)
}
if (stepKind === 'signal-body') {

View file

@ -132,9 +132,7 @@ describe('wizardActionChain', () => {
municipalitySlug: 'cairu',
entryAction: 'update-votes',
}),
).toBe(
`${CAMPAIGN_ACTIONS_HOME}/mudar-tendencia?municipio=cairu&entry=update-votes`,
)
).toBe(`${CAMPAIGN_ACTIONS_HOME}/mudar-tendencia?municipio=cairu&entry=update-votes`)
expect(
wizardPreviousHref({
actionSlug: 'atualizar-lideranca',