Percobaan notifikasi

Add:
- app/(application)/(user)/test-notifications.tsx
- components/_ShareComponent/NotificationInitializer.tsx
- screens/Home/HeaderBell.tsx
- service/api-notifications.ts

Fix:
- app/(application)/(user)/home.tsx
- app/_layout.tsx
- screens/Authentication/LoginView.tsx

### No Issue
This commit is contained in:
2025-12-15 17:46:05 +08:00
parent 34680a4c38
commit d27c01ed56
7 changed files with 226 additions and 101 deletions

View File

@@ -0,0 +1,23 @@
import { apiConfig } from "./api-config";
type NotificationProp = {
fcmToken: string
title: string,
body: Object
}
export async function apiNotificationsSend({ data }: { data: NotificationProp }) {
try {
const response = await apiConfig.post(`/mobile/notifications`, {
data: data,
});
console.log("Fecth Notif", response.data)
return response.data;
} catch (error) {
throw error;
}
}