Format B135 wizard back navigation files
This commit is contained in:
parent
28525aab4b
commit
989e3abab8
4 changed files with 12 additions and 11 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
|
|
@ -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 = () => {
|
||||
|
|
|
|||
|
|
@ -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') {
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
Loading…
Reference in a new issue