Skip to content

Commit

Permalink
fix: add touched if last page
Browse files Browse the repository at this point in the history
  • Loading branch information
ooooorobo committed Dec 17, 2024
1 parent 8cacb35 commit 1b1c264
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/pages/form/ideal_partner/IdealPartnerPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export const IdealPartnerPage = ({ onClickNextStep }: { onClickNextStep: () => v
if (currentStepIdx > 0) {
addTouchedStep(StepKeys[currentStepIdx - 1]);
}
if (currentStepIdx === StepKeys.length) {
addTouchedStep(StepKeys[currentStepIdx]);
}
}, [addTouchedStep, currentStepIdx]);

const handleClickNext = () => {
Expand Down
3 changes: 3 additions & 0 deletions src/pages/form/my_profile/MyProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ export const MyProfilePage = ({ onClickNextStep }: { onClickNextStep: () => void
if (currentStepIdx > 0) {
addTouchedStep(StepKeys[currentStepIdx - 1]);
}
if (currentStepIdx === StepKeys.length) {
addTouchedStep(StepKeys[currentStepIdx]);
}
}, [addTouchedStep, currentStepIdx]);

const handleClickNext = useCallback(() => {
Expand Down

0 comments on commit 1b1c264

Please sign in to comment.