Skip to content

Commit

Permalink
Merge pull request #500 from etn-ccis/fix/showSuccessScreen-prop
Browse files Browse the repository at this point in the history
Fix showSuccessScreen prop when set to false
  • Loading branch information
JeffGreiner-eaton authored Oct 3, 2023
2 parents 17c7bde + a3e43de commit 8c3ad10
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ export const ForgotPasswordScreen: React.FC<ForgotPasswordScreenProps> = (props)
try {
setIsLoading(true);
await actions.forgotPassword(email);
setShowSuccessScreen(true);
if (props.showSuccessScreen === false) {
navigate(routeConfig.LOGIN as string);
} else {
setShowSuccessScreen(true);
}
} catch (_error) {
triggerError(_error as Error);
} finally {
Expand Down

0 comments on commit 8c3ad10

Please sign in to comment.