Fix rejected apple delete account & start for notification

### No issue
This commit is contained in:
2025-11-18 14:29:02 +08:00
parent 76debfd6a6
commit 059b4d053a
14 changed files with 111 additions and 30 deletions

View File

@@ -1,27 +1,10 @@
import { AuthProvider } from "@/context/AuthContext";
import AppRoot from "@/screens/RootLayout/AppRoot";
import { registerForPushNotificationsAsync } from "@/utils/notifications";
import { useEffect } from "react";
import "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import Toast from "react-native-toast-message";
export default function RootLayout() {
useEffect(() => {
// Jalankan sekali saat app pertama kali dibuka
registerForPushNotificationsAsync().then((token) => {
if (token) {
// TODO: Kirim token ke backend kamu
// Contoh:
// fetch('https://api.hipmibadung.id/save-token', {
// method: 'POST',
// headers: { 'Content-Type': 'application/json' },
// body: JSON.stringify({ token })
// });
}
});
}, []);
return (
<>
<SafeAreaProvider>