handle notification type and navigate using deeplinking

This commit is contained in:
Jaanu423
2025-10-08 16:36:37 +05:30
25 changed files with 1228 additions and 530 deletions
+3 -3
View File
@@ -20,7 +20,7 @@ import { LOGIN_URL, VARIFY_OTP_URL } from "../utils/ApiUrls";
import colors from "../components/colors";
import LinearGradient from "react-native-linear-gradient";
import CustomAlert from "../components/CostomAlart";
import FirebaseService from "../utils/firebase/firebaseServices";
import { getFcmToken } from "../utils/firebase/firebaseServices";
const CELL_COUNT = 6;
type OtpVerifyRouteProp = RouteProp<RootStackParamList, "OtpVarify">;
@@ -128,7 +128,7 @@ export default function OtpVerificationScreen() {
const { jwt } = res.data?.data || {};
console.log("✅ OTP Verified:", res.data);
await saveToken(jwt);
await FirebaseService.getFcmToken(res.data?.data?.userId);
await getFcmToken(res.data?.data?.userId);
let hasActionRun = false;
@@ -136,7 +136,7 @@ export default function OtpVerificationScreen() {
if (hasActionRun) return;
hasActionRun = true;
hideAlert();
navigation.navigate("Home");
navigation.replace("Home");
};
triggerAlert(