Add post status change notifications and set up Git push

Installs `expo-notifications` and `expo-task-manager` packages. Implements a `useNotifications` hook for requesting permissions, polling for post status changes, and sending local notifications for published or errored posts. Updates `app.json` to include notification permissions and the notification handler. Wires the `useNotifications` hook into the app's root layout.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 7b0991ce-c7b8-4c82-9acc-fd3f9e762a01
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 7e5cd315-f570-494a-b5a6-c6ee284a4516
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/86064bd6-c937-4ca5-a5bf-bbef5749fb60/7b0991ce-c7b8-4c82-9acc-fd3f9e762a01/kWnlAIM
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
antoinepiron
2026-05-03 11:48:45 +00:00
parent bbbcf9f586
commit 9e4c9071e6
6 changed files with 262 additions and 2 deletions
+7
View File
@@ -15,6 +15,7 @@ import { SafeAreaProvider } from "react-native-safe-area-context";
import { ErrorBoundary } from "@/components/ErrorBoundary";
import { PostizProvider } from "@/context/PostizContext";
import { useNotifications } from "@/hooks/useNotifications";
SplashScreen.preventAutoHideAsync();
@@ -27,6 +28,11 @@ const queryClient = new QueryClient({
},
});
function NotificationBootstrap() {
useNotifications();
return null;
}
function RootLayoutNav() {
return (
<Stack screenOptions={{ headerBackTitle: "Back" }}>
@@ -56,6 +62,7 @@ export default function RootLayout() {
<ErrorBoundary>
<QueryClientProvider client={queryClient}>
<PostizProvider>
<NotificationBootstrap />
<GestureHandlerRootView style={{ flex: 1 }}>
<KeyboardProvider>
<RootLayoutNav />