File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export const usePushNotifications = () => {
21
21
registerForPushNotificationsAsync ( ) . then ( async ( token ) => {
22
22
if ( token ) {
23
23
console . log (
24
- "Finished registerping for Notifications - FCM Token:" ,
24
+ "Finished registering for Notifications - FCM Token:" ,
25
25
token
26
26
) ;
27
27
setFcmToken ( token ) ; // Store the push token
@@ -59,6 +59,8 @@ export const usePushNotifications = () => {
59
59
shouldShowAlert : true ,
60
60
shouldPlaySound : true ,
61
61
shouldSetBadge : true ,
62
+ shouldShowBanner : true ,
63
+ shouldShowList : true ,
62
64
} ) ,
63
65
} ) ;
64
66
@@ -76,8 +78,8 @@ export const useNotificationObserver = () => {
76
78
useEffect ( ( ) => {
77
79
const redirectToUrl = ( notification : Notifications . Notification ) => {
78
80
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 ) ;
81
83
}
82
84
} ;
83
85
You can’t perform that action at this time.
0 commit comments