notifee
notifee copied to clipboard
Notification type, Property 'ab_cat' does not exist on type
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;
}
});