Reset the registration workflow, when Finish button on success screen is pressed
Closed this issue · 1 comments
surajeaton commented
Describe the bug / expected behavior
Because the react-native-pager-view/rect-navigation does not unmount screens, after completing the registration workflow, if you go back to the registration route, you'll be at the end (success screen) instead of the beginning.
We should manually reset the registration workflow to set it back to the beginning.
What are the steps to reproduce?
- In the example, when the user goes through the Registration workflow and press Finish button on the Success Screen, it navigates to the Home screen
- Revisit the workflow, it will display the success success
Screenshots / Screen recording
Screen.Recording.2024-03-07.at.6.57.38.PM.mov
Suggested fix
When the Close button is pressed on any workflow screen or the Finish button is pressed on a success screen, the workflow should be reset. We should set the initial current screen / initial screen back to the default value from props (or zero) and clear any data that has been collected in RegistrationWorkflowContext.
ektaghag-eaton commented
Fixed here #409