fix some type errors
This commit is contained in:
@@ -177,7 +177,14 @@ export function useNotificationsHandler() {
|
||||
|
||||
Notifications.setNotificationHandler({
|
||||
handleNotification: async e => {
|
||||
if (e.request.trigger.type !== 'push') return DEFAULT_HANDLER_OPTIONS
|
||||
if (
|
||||
e.request.trigger == null ||
|
||||
typeof e.request.trigger !== 'object' ||
|
||||
!('type' in e.request.trigger) ||
|
||||
e.request.trigger.type !== 'push'
|
||||
) {
|
||||
return DEFAULT_HANDLER_OPTIONS
|
||||
}
|
||||
|
||||
logger.debug(
|
||||
'Notifications: received',
|
||||
@@ -220,6 +227,9 @@ export function useNotificationsHandler() {
|
||||
|
||||
if (
|
||||
e.actionIdentifier === Notifications.DEFAULT_ACTION_IDENTIFIER &&
|
||||
e.notification.request.trigger != null &&
|
||||
typeof e.notification.request.trigger === 'object' &&
|
||||
'type' in e.notification.request.trigger &&
|
||||
e.notification.request.trigger.type === 'push'
|
||||
) {
|
||||
logger.debug(
|
||||
|
||||
@@ -229,6 +229,7 @@ const getKey = (label: string, index: number, id?: string) => {
|
||||
return `${label}_${index}`
|
||||
}
|
||||
|
||||
// @ts-expect-error - web only styles. the only style that should be broken here is `outline`
|
||||
const styles = StyleSheet.create({
|
||||
separator: {
|
||||
height: 1,
|
||||
|
||||
Reference in New Issue
Block a user