This repository was archived by the owner on Dec 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 17
This repository was archived by the owner on Dec 3, 2022. It is now read-only.
Icons doesnt appear using headerRight after react-navigation update ^3.0.0-rc.5 #7
Copy link
Copy link
Open
Description
'headerRight' icon doesn't appear when headerBackButton shows. Happening after updated react-navigation to version ^3.0.0-rc.5.
Any help would be appreciated!!
software | version
react-navigation | 4.0.10
react-native | ^0.61.5
expo | 35
npm or yarn | npm
static navigationOptions = ({ navigation }) => {
const activityId = navigation.state.params.activity.id;
let activity = Activities.getActivityById(activityId);
const client = navigation.state.params.client;
let responsiblePerson = getUserToNotify(client);
let responsibleContactNumber = getResponsibleContactNumber(responsiblePerson);
if (responsibleContactNumber != null) {
var number = responsibleContactNumber.number;
if (responsibleContactNumber.countryCode == "33") {
if ( (number.charAt(0)) != 0 ) {
number = "0" + number;
}
}
}
return {
headerTitle: null,
headerStyle: { backgroundColor: '#fff' },
headerTintStyle: Styles.colorPrimary,
headerRight: () => (
<View style={{flexDirection: 'row'}}>
{client.cellNumber || client.homeNumber ?
<TouchableOpacity
onPress={() => responsibleContactNumber == null ? null : Communications.phonecall(number, true)}
style={{flex: 1, paddingTop: 10, paddingBottom: 10, paddingLeft: 10}}>
<FontAwesome
name='phone'
style={{paddingHorizontal: 10, color: Styles.colorPrimary}}
size={23}
/>
</TouchableOpacity>
: null }
{client ?
<TouchableOpacity
onPress={() => navigation.navigate('ClientTabs', {data: client, deleteAvailable: false})}
style={{flex: 1, paddingTop: 10, paddingBottom: 10, paddingLeft: 10}}>
<FontAwesome
name='user'
style={{paddingHorizontal: 10, color: Styles.colorPrimary}}
size={23}
/>
</TouchableOpacity>
: null }
{ activity.isDeclined != true ?
<TouchableOpacity
onPress={() => navigation.navigate('AppointmentEditor', { activityId: activityId, onGoBack: navigation.state.params.onGoBack })}
style={{flex: 1, paddingTop: 10, paddingBottom: 10, paddingLeft: 10}}>
<FontAwesome
name='pencil-square-o'
style={{paddingHorizontal: 10, color: Styles.colorPrimary}}
size={23}
/>
</TouchableOpacity>
: null }
</View>
)
};
};
nathanhleung
Metadata
Metadata
Assignees
Labels
No labels