diff --git a/components/Header.js b/components/Header.js index f15e028..207c7e8 100644 --- a/components/Header.js +++ b/components/Header.js @@ -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 ([ , @@ -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 ( + 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={[ diff --git a/navigation/Menu.js b/navigation/Menu.js index d345de0..3c726ef 100644 --- a/navigation/Menu.js +++ b/navigation/Menu.js @@ -41,7 +41,7 @@ function CustomDrawerContent({ drawerPosition, navigation, profile, focused, sta })} - DOCUMENTATION + DOCUMENTATION diff --git a/screens/Pro.js b/screens/Pro.js index 462ae0b..ef914e7 100644 --- a/screens/Pro.js +++ b/screens/Pro.js @@ -1,5 +1,5 @@ import React from 'react'; -import { ImageBackground, Image, StyleSheet, StatusBar, Dimensions, Platform } from 'react-native'; +import { ImageBackground, Image, StyleSheet, StatusBar, Dimensions, Platform, Linking } from 'react-native'; import { Block, Button, Text, theme } from 'galio-framework'; const { height, width } = Dimensions.get('screen'); @@ -53,8 +53,8 @@ export default class Pro extends React.Component { shadowless style={styles.button} color={argonTheme.COLORS.INFO} - onPress={() => navigation.navigate('Home')}> - COMING SOON + onPress={() => Linking.openURL('https://www.creative-tim.com/product/argon-pro-react-native').catch((err) => console.error('An error occurred', err))}> + BUY NOW