UNPKG

create-nova-expo-template

Version:

A template for creating a new React Native app using Expo and TypeScript, with a focus on performance and best practices.

19 lines (15 loc) 611 B
import { NotificationData, NotificationType } from "@/apis/@types/notification"; export default function handleNotificationRedirection( notificationData: NotificationData, navigation: { navigate: (name: string, params?: object) => void } ) { console.log(notificationData, "NOTIFICATION DATA"); // #### Create Order Notification #### if (notificationData?.template_slug === NotificationType.NEW_ORDER) { const productId = notificationData?.target_object_id; if (productId) { // @ts-ignore navigation.navigate("ProductDetailsScreen", { productId }); } } }