Pro links to product page

This commit is contained in:
Alin Gheorghe
2020-03-05 18:53:01 -05:00
parent 29864f971b
commit e132d75fd0
3 changed files with 14 additions and 12 deletions

View File

@@ -52,7 +52,6 @@ class Header extends React.Component {
}
renderRight = () => {
const { white, title, navigation } = this.props;
const { routeName } = navigation.state;
if (title === 'Title') {
return [
@@ -61,7 +60,7 @@ class Header extends React.Component {
]
}
switch (routeName) {
switch (title) {
case 'Home':
return ([
<BellButton key='chat-home' navigation={navigation} isWhite={white} />,
@@ -167,8 +166,8 @@ class Header extends React.Component {
}
render() {
const { back, title, white, transparent, bgColor, iconColor, titleColor, navigation, ...props } = this.props;
const { routeName } = navigation.state;
const noShadow = ['Search', 'Categories', 'Deals', 'Pro', 'Profile'].includes(routeName);
const noShadow = ['Search', 'Categories', 'Deals', 'Pro', 'Profile'].includes(title);
const headerStyles = [
!noShadow ? styles.shadow : null,
transparent ? { backgroundColor: 'rgba(0,0,0,0)' } : null,
@@ -182,7 +181,7 @@ class Header extends React.Component {
return (
<Block style={headerStyles}>
<NavBar
back={back}
back={false}
title={title}
style={navbarStyles}
transparent={transparent}
@@ -190,9 +189,12 @@ class Header extends React.Component {
rightStyle={{ alignItems: 'center' }}
left={
<Icon
name={back ? 'nav-left' : "menu-8"} family="ArgonExtra"
size={14} onPress={this.handleLeftPress}
color={iconColor || argonTheme.COLORS.ICON}/>
name={back ? 'chevron-left' : "menu"} family="entypo"
size={20} onPress={this.handleLeftPress}
color={iconColor || (white ? argonTheme.COLORS.WHITE : argonTheme.COLORS.ICON)}
style={{ marginTop: 2 }}
/>
}
leftStyle={{ paddingVertical: 12, flex: 0.2 }}
titleStyle={[