upd: push notifikasi
Deskripsi: - blm selesai No Issues
This commit is contained in:
@@ -11,10 +11,20 @@ import store from "@/lib/store";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { Redirect, router, Stack } from "expo-router";
|
||||
import { StatusBar } from 'expo-status-bar';
|
||||
import { Text } from "react-native";
|
||||
import { useEffect } from "react";
|
||||
import { Alert, Text } from "react-native";
|
||||
import { Provider } from "react-redux";
|
||||
import messaging from "@react-native-firebase/messaging";
|
||||
|
||||
export default function RootLayout() {
|
||||
useEffect(() => {
|
||||
const unsubscribe = messaging().onMessage(async remoteMessage => {
|
||||
Alert.alert('A new FCM message arrived!', JSON.stringify(remoteMessage));
|
||||
});
|
||||
|
||||
return unsubscribe;
|
||||
}, []);
|
||||
|
||||
const { token, isLoading } = useAuthSession()
|
||||
|
||||
if (isLoading) {
|
||||
|
||||
@@ -4,9 +4,10 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { Redirect } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { Text } from "react-native";
|
||||
|
||||
import { useNotification } from "@/lib/useNotification";
|
||||
|
||||
export default function Index() {
|
||||
useNotification()
|
||||
const [isValid, setValid] = useState(false)
|
||||
const [phone, setPhone] = useState('')
|
||||
const [otp, setOtp] = useState(0)
|
||||
|
||||
Reference in New Issue
Block a user