You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
756 B

import React, { useContext, useEffect, useState } from "react";
import { FontAwesome5 } from "@expo/vector-icons";
import {
HeaderButtons,
HeaderButton,
Item,
} from "react-navigation-header-buttons";
const IoniconsHeaderButton = (props) => (
<HeaderButton IconComponent={FontAwesome5} iconSize={23} {...props} />
);
function HeaderBarMenu(navigation) {
React.useLayoutEffect(() => {
navigation.setOptions({
headerRight: () => (
<HeaderButtons HeaderButtonComponent={IoniconsHeaderButton}>
<Item
title="user"
iconName="user"
onPress={() => navigation.navigate("Perfil")}
/>
</HeaderButtons>
),
});
}, [navigation]);
}
export default HeaderBarMenu;