fix: notifikasi in app jika isinya kosong
This commit is contained in:
@@ -37,15 +37,17 @@ export default function RootLayout() {
|
|||||||
const id = remoteMessage?.data?.id;
|
const id = remoteMessage?.data?.id;
|
||||||
const category = remoteMessage?.data?.category;
|
const category = remoteMessage?.data?.category;
|
||||||
const content = remoteMessage?.data?.content;
|
const content = remoteMessage?.data?.content;
|
||||||
Notifier.showNotification({
|
if (remoteMessage.notification != undefined && remoteMessage.notification.title != undefined && remoteMessage.notification.body != undefined) {
|
||||||
title: remoteMessage.notification?.title,
|
Notifier.showNotification({
|
||||||
description: remoteMessage.notification?.body,
|
title: remoteMessage.notification?.title,
|
||||||
duration: 3000,
|
description: remoteMessage.notification?.body,
|
||||||
animationDuration: 300,
|
duration: 3000,
|
||||||
showEasing: Easing.ease,
|
animationDuration: 300,
|
||||||
onPress: () => handleReadNotification(String(id), String(category), String(content)),
|
showEasing: Easing.ease,
|
||||||
hideOnPress: true,
|
onPress: () => handleReadNotification(String(id), String(category), String(content)),
|
||||||
});
|
hideOnPress: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return unsubscribe;
|
return unsubscribe;
|
||||||
|
|||||||
Reference in New Issue
Block a user