import { useContext } from 'react' import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { AuthContext } from '../login/AuthContext'; import { ProductFormScreen } from './ProductFormScreen'; import { ProductListScreen } from './ProductListScreen'; export type RootStackParams = { ProductListScreen: undefined, ProductFormScreen: { id: number } } const Stack = createNativeStackNavigator(); export const ProductStack = () => { const { isAuthenticated } = useContext(AuthContext) return ( {isAuthenticated && ( <> )} ) }