notifee icon indicating copy to clipboard operation
notifee copied to clipboard

Notification type, Property 'ab_cat' does not exist on type

Open mharrisweb opened this issue 7 months ago • 0 comments

I am trying to access the ab_cat prop from the detail object - I get a typescript error below. How can I fix this?

 Property 'ab_cat' does not exist on type 'string | number | object'.
  Property 'ab_cat' does not exist on type 'string'.
        notifee.onForegroundEvent(({ type, detail }) => {
          switch (type) {
    
            case EventType.ACTION_PRESS:
              const identifier = detail?.pressAction?.id;

              const deeplink = detail?.notification?.data?.ab;

              Linking.openURL(deeplink?.ab_cat[identifier].a_uri);

              break;
          }
        });

mharrisweb avatar Jul 17 '24 09:07 mharrisweb