Skip to content

Commit

Permalink
Refactor: Remove goToSpecificStep and update navigation logic in Plan…
Browse files Browse the repository at this point in the history
…enDeresSteg
  • Loading branch information
kmthorsnes committed Jan 31, 2025
1 parent 7bbef88 commit ea2c3b3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 0 additions & 5 deletions apps/planlegger/src/app-data/usePlanleggerNavigator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ export const usePlanleggerNavigator = (locale: string) => {
setPath(nextPath);
}, [stepConfig]);

const goToSpecificStep = useCallback((specificPath: PlanleggerRoutes) => {
setPath(specificPath);
}, []);

const avbrytSøknad = useCallback(() => {
setPath(PlanleggerRoutes.OM_PLANLEGGEREN);
}, []);
Expand All @@ -49,7 +45,6 @@ export const usePlanleggerNavigator = (locale: string) => {
goToPreviousDefaultStep,
goToNextStep,
goToNextDefaultStep,
goToSpecificStep,
avbrytSøknad,
}),
[goToPreviousDefaultStep, goToNextDefaultStep, goToNextStep, avbrytSøknad],
Expand Down
2 changes: 1 addition & 1 deletion apps/planlegger/src/steps/planen-deres/PlanenDeresSteg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const PlanenDeresSteg = ({ stønadskontoer, locale }: Props) => {
goToPreviousStep={navigator.goToPreviousDefaultStep}
nextButtonOnClick={() => {
lagreUttaksplan([...planforslag.søker1, ...planforslag.søker2]);
navigator.goToSpecificStep(PlanleggerRoutes.OPPSUMMERING);
navigator.goToNextStep(PlanleggerRoutes.OPPSUMMERING);
}}
isJumpToEndButton
useSimplifiedTexts
Expand Down

0 comments on commit ea2c3b3

Please sign in to comment.