Fix notifikasi system
Add: - screens/Admin/AdminNotificationBell.tsx Fix: - app.config.js - app/(application)/(user)/home.tsx - app/(application)/(user)/test-notifications.tsx - app/(application)/admin/_layout.tsx - app/_layout.tsx - components/Notification/NotificationInitializer.tsx - context/AuthContext.tsx - hooks/use-notification-store.tsx - ios/HIPMIBadungConnect/Info.plist - screens/Home/HeaderBell.tsx - service/api-device-token.ts - service/api-notifications.ts ### No Issue
This commit is contained in:
@@ -39,7 +39,7 @@ export default function NotificationInitializer() {
|
||||
if (!supported) {
|
||||
console.log("‼️ FCM tidak didukung");
|
||||
return;
|
||||
};
|
||||
}
|
||||
|
||||
const authStatus = await requestPermission(messagingInstance);
|
||||
if (authStatus !== AuthorizationStatus.AUTHORIZED) {
|
||||
@@ -62,7 +62,7 @@ export default function NotificationInitializer() {
|
||||
"-" +
|
||||
(Application.nativeBuildVersion || "unknown");
|
||||
const deviceId =
|
||||
Device.osInternalBuildId || Device.modelName + "-" + Date.now();
|
||||
Device.osInternalBuildId || Device.modelName || "unknown";
|
||||
|
||||
// Kirim ke backend
|
||||
await apiDeviceRegisterToken({
|
||||
@@ -101,7 +101,7 @@ export default function NotificationInitializer() {
|
||||
}
|
||||
|
||||
console.log("📥 Menambahkan ke store:", { title, body, safeData });
|
||||
addNotification({ title, body, data: safeData , type: "notification", });
|
||||
addNotification({ title, body, data: safeData, type: "notification" });
|
||||
console.log("✅ Notifikasi ditambahkan ke state");
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user