api integration for joined user

This commit is contained in:
Jaanu423
2025-09-22 18:50:06 +05:30
parent ff8c0439f6
commit bcd41f81e6
12 changed files with 213 additions and 113 deletions
+2 -5
View File
@@ -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) {