- more
This commit is contained in:
@@ -24,9 +24,9 @@ export default class AppHeader extends Component {
|
||||
return (
|
||||
<Header
|
||||
placement="left"
|
||||
leftComponent={<HeaderContentRight navigation={navigation} />}
|
||||
centerComponent={<HeaderTitle navigation={navigation} />}
|
||||
rightComponent={<HeaderContentLeft navigation={navigation} />}
|
||||
leftComponent={<HeaderContentLeft navigation={navigation} />}
|
||||
rightComponent={<HeaderContentRight navigation={navigation} />}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,11 @@ export default function HeaderContentLeft({
|
||||
return <BackIcon action={_goBack} />;
|
||||
}
|
||||
|
||||
return <EventsIcon action={hasMultipleEvents ? _showEvents : null} />;
|
||||
if (hasMultipleEvents) {
|
||||
return <EventsIcon action={_showEvents} />;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
HeaderContentLeft.propTypes = {
|
||||
|
||||
@@ -8,7 +8,7 @@ export default function HeaderContentRight({ hideUserProfileButton, navigation }
|
||||
return null;
|
||||
}
|
||||
|
||||
return <UserProfileButton />;
|
||||
return <UserProfileButton navigation={navigation} />;
|
||||
}
|
||||
|
||||
HeaderContentRight.propTypes = {
|
||||
|
||||
@@ -8,6 +8,7 @@ import EventTitle from './EventTitle/EventTitle.container.js';
|
||||
import styles from './HeaderTitle.styles.js';
|
||||
|
||||
const STRINGS = {
|
||||
EVENTS: 'Events',
|
||||
PROFILE: 'Profile',
|
||||
};
|
||||
|
||||
@@ -34,7 +35,7 @@ export default function HeaderTitle({
|
||||
if (activeRoute === 'Events') {
|
||||
return (
|
||||
<TouchableOpacity onPress={_goBack}>
|
||||
<Text style={styles.screenHeader}>{STRINGS.PROFILE}</Text>
|
||||
<Text style={styles.screenHeader}>{STRINGS.EVENTS}</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -13,8 +13,12 @@ export default function UserProfileButton({
|
||||
navigation,
|
||||
}) {
|
||||
const _goToProfile = () => {
|
||||
navigation.navigate('Profile');
|
||||
return false;
|
||||
if (isRegisteredAccount) {
|
||||
navigation.navigate('Profile');
|
||||
return false;
|
||||
}
|
||||
|
||||
navigation.navigate('SignInOrRegister');
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user