I can't put a dropdown menu on the button on the top bar.
I've tried everything, but I couldn't get any results.
I want to define a dropdown menu for the profile default.
I will only add language support and the log out button to the dropdown menu.
const Tabs = () => {
const navigation = useNavigation();
const authCtx = useContext(AuthContext);
const Tab = createBottomTabNavigator();
return (
<Tab.Navigator
headerStyle={{ backgroundColor: Colors.dark100 }}
screenOptions={{
tabBarShowLabel: false,
tabBarStyle: { ...styles.container },
headerRight: () => (
<View
style={{ display: "flex", flexDirection: "row", marginRight: 0 }}
>
<TouchableOpacity onPress={() => DropDownPicker}>
<View
style={{
marginRight: 16,
paddingRight: 16,
flexDirection: "row",
alignItems: "center",
}}
>
<Image
source={require("../../assets/profile-default.jpg")}
style={{ width: 32, height: 32, borderRadius: 32 }}
/>
</View>
</TouchableOpacity>
</View>
),
}}
style={styles.shadow}
/>
);
};