upd: clear warning
Deskripsi: - update firebase > clear warning No Issues
This commit is contained in:
9
index.js
9
index.js
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user