I have a model of these:
image: string;redirect_option: 'PROFILE' | 'PRODUCT';redirect: Product | User;
Now I render the list and want add a function:
const handleNavigateToRedirectedOption = ({ redirected_option, params }: { redirected_option: 'PROFILE' | 'PRODUCT'; redirect: Product | User;}) => { redirected_option === 'PROFILE'&& navigation.navigate('UserProfile', params); };const renderItem = ({ item }) => (<Pressable onPress={}><Text>List</Text></Pressable>);
Now I get this error:
Argument of type 'IProduct | CurrentUser' is not assignable to parameter of type 'CurrentUser'. Type 'IProduct' is missing the following properties from type 'CurrentUser': user_id, profile_image,
I know the problem but IDK how can I solve it. this comes at navigation...params