Skip to content

Commit 5067096

Browse files
Added missing props & fixed spelling mistake.
1 parent 87160f4 commit 5067096

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hooks/usePushNotifications.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export const usePushNotifications = () => {
2121
registerForPushNotificationsAsync().then(async (token) => {
2222
if (token) {
2323
console.log(
24-
"Finished registerping for Notifications - FCM Token:",
24+
"Finished registering for Notifications - FCM Token:",
2525
token
2626
);
2727
setFcmToken(token); // Store the push token
@@ -59,6 +59,8 @@ export const usePushNotifications = () => {
5959
shouldShowAlert: true,
6060
shouldPlaySound: true,
6161
shouldSetBadge: true,
62+
shouldShowBanner: true,
63+
shouldShowList: true,
6264
}),
6365
});
6466

@@ -76,8 +78,8 @@ export const useNotificationObserver = () => {
7678
useEffect(() => {
7779
const redirectToUrl = (notification: Notifications.Notification) => {
7880
const url = notification.request.content.data?.url;
79-
if (url) {
80-
router.push(url);
81+
if (typeof url === "string") {
82+
router.push(url as any);
8183
}
8284
};
8385

0 commit comments

Comments
 (0)