upd: clear warning

Deskripsi:
- update firebase > clear warning

No Issues
This commit is contained in:
2025-08-08 11:26:09 +08:00
parent 7555ece0fa
commit 602860d9c3
4 changed files with 27 additions and 31 deletions

View File

@@ -1,12 +1,15 @@
// index.js
import 'expo-router/entry'; // ⬅️ wajib ada agar expo-router tetap bekerja
import messaging from '@react-native-firebase/messaging';
import { getApp } from '@react-native-firebase/app';
import { getMessaging, setBackgroundMessageHandler } from '@react-native-firebase/messaging';
import AsyncStorage from '@react-native-async-storage/async-storage';
// ✅ Firebase background handler — wajib diletakkan DI SINI
messaging().setBackgroundMessageHandler(async remoteMessage => {
// ✅ Ambil instance messaging modular
const mess = getMessaging(getApp());
// ✅ Firebase background handler — wajib diletakkan DI SINI
setBackgroundMessageHandler(mess, async remoteMessage => {
const screen = remoteMessage?.data?.category;
const content = remoteMessage?.data?.content;