api integration for joined user
This commit is contained in:
@@ -19,10 +19,7 @@ import {
|
||||
import { RootStackParamList } from "../navigation/AppNavigator";
|
||||
import * as Keychain from "react-native-keychain";
|
||||
import { BASE_URL, LOGIN_URL, VARIFY_OTP_URL } from "../utils/ApiUrls";
|
||||
import { StackNavigationProp } from "@react-navigation/stack";
|
||||
import colors from "../components/colors";
|
||||
import { useDispatch } from "react-redux";
|
||||
import { setUserData } from "../redux/userSlice";
|
||||
import { fetchUserProfile } from "../utils/HelperFunction";
|
||||
|
||||
const theme = {
|
||||
@@ -44,7 +41,7 @@ export default function OtpVerificationScreen() {
|
||||
const inputs = useRef<Array<TextInput | null>>([]);
|
||||
const route = useRoute<OtpVerifyRouteProp>();
|
||||
const { mobile } = route.params;
|
||||
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>();
|
||||
const navigation = useNavigation<any>();
|
||||
// animations
|
||||
const fade = useRef(new Animated.Value(0)).current;
|
||||
const slide = useRef(new Animated.Value(24)).current;
|
||||
@@ -92,7 +89,7 @@ export default function OtpVerificationScreen() {
|
||||
if (res.data.statusCode === 200) {
|
||||
saveToken(res.data.data);
|
||||
fetchUserProfile()
|
||||
navigation.navigate('Home')
|
||||
navigation.navigate("Home", { refreshProfile: true });
|
||||
ToastAndroid.show("OTP Verified Successfully!", ToastAndroid.SHORT);
|
||||
}
|
||||
} catch (err: any) {
|
||||
|
||||
Reference in New Issue
Block a user