Skip to content

Commit

Permalink
feat: added success message
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisParedes1 committed Dec 5, 2023
1 parent b7f99c0 commit 1c56d2b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/navigation/signin-complete.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import * as z from 'zod';
import { getUserState, signInComplete } from '@/core';
import type { UserType } from '@/core/auth/utils';
import { Button, ControlledInput, ScrollView, Text, View } from '@/ui';
import { showMessage } from 'react-native-flash-message';

import { locationOptions } from './list-of-countries';

Expand Down Expand Up @@ -50,6 +51,13 @@ const whenSignInComplete: SignUpFormProps['onSignUpSubmit'] = (data) => {
} else {
console.error('Error: Current user data is undefined');
}

showMessage({
message: 'User Profile Edited Successfully',
type: 'success',
duration: 3000,
autoHide: true,
});
};
export const SignInComplete = () => {
return <FormForSignInComplete onSignUpSubmit={whenSignInComplete} />;
Expand Down
7 changes: 7 additions & 0 deletions src/screens/profile/verify-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ const whenVerifyComplete: VerifyFormProps['onVerifySubmit'] = async (data) => {
}

signInComplete(updatedUser);

showMessage({
message: 'Request Verification sent successfully',
type: 'success',
duration: 3000,
autoHide: true,
});
} else {
console.error('Error: Current user data is undefined');
}
Expand Down

0 comments on commit 1c56d2b

Please sign in to comment.