Skip to content

Commit 9d69b44

Browse files
Added triggerSampleNotification function back for testing.
1 parent 38ff8d8 commit 9d69b44

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

Diff for: utils/notifications.ts

+13-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import messaging, {
33
FirebaseMessagingTypes,
44
} from "@react-native-firebase/messaging";
55
import { Alert, PermissionsAndroid, Platform } from "react-native";
6-
import { router } from "expo-router";
76
import * as Device from "expo-device";
87
import { NOTIFICATION_STRINGS } from "../constants/Notifications";
98

@@ -112,6 +111,19 @@ export const savePushToken = async (token: string): Promise<void> => {
112111
}
113112
};
114113

114+
// Example function to trigger a local notification
115+
export async function triggerLocalSampleNotification() {
116+
await Notifications.scheduleNotificationAsync({
117+
content: {
118+
title: "Job Notification",
119+
body: "This is a test notification.",
120+
sound: true,
121+
data: { extraData: "Some data" },
122+
},
123+
trigger: null, // Send immediately
124+
});
125+
}
126+
115127
/**
116128
* DEPRACATED
117129
* DEPRACATED

0 commit comments

Comments
 (0)