From 69189c84bdb69c187e92eca5b9e6b4d00b62f4fa Mon Sep 17 00:00:00 2001
From: Michael <michael.foiani@gmail.com>
Date: Fri, 2 Jul 2021 11:58:09 -0400
Subject: Add new upload button in the middle on the nav bar and shifting the
 older icons to new positions. Follow Blessing's design by enlargining it and
 making the other icons a bit smaller. Also, add the navigation that goes to
 the camera screen from the upload icon.

Ending the rebase from master.
---
 src/components/common/NavigationIcon.tsx | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

(limited to 'src/components/common/NavigationIcon.tsx')

diff --git a/src/components/common/NavigationIcon.tsx b/src/components/common/NavigationIcon.tsx
index 5128f3da..f97bb861 100644
--- a/src/components/common/NavigationIcon.tsx
+++ b/src/components/common/NavigationIcon.tsx
@@ -18,6 +18,7 @@ interface NavigationIconProps extends TouchableOpacityProps {
     | 'Chat';
   disabled?: boolean;
   newIcon?: boolean;
+  isBigger?: boolean;
 }
 
 const NavigationIcon = (props: NavigationIconProps) => {
@@ -35,7 +36,7 @@ const NavigationIcon = (props: NavigationIconProps) => {
       break;
     case 'Upload':
       imgSrc = props.disabled
-        ? require('../../assets/navigationIcons/upload.png')
+        ? require('../../assets/navigationIcons/new-upload.png')
         : require('../../assets/navigationIcons/upload-clicked.png');
       break;
     case 'Notifications':
@@ -68,12 +69,22 @@ const NavigationIcon = (props: NavigationIconProps) => {
   return (
     <View style={styles.container}>
       <TouchableOpacity {...props}>
-        <Image source={imgSrc} style={styles.icon} />
+        <Image source={imgSrc} style={getStyles(props.isBigger ?? false)} />
       </TouchableOpacity>
     </View>
   );
 };
 
+const getStyles = (isBigger: boolean) =>
+  isBigger ? biggerIconStyles.icon : styles.icon;
+
+const biggerIconStyles = StyleSheet.create({
+  icon: {
+    height: 44,
+    width: 44,
+  },
+});
+
 const styles = StyleSheet.create({
   container: {
     flex: 1,
@@ -87,8 +98,8 @@ const styles = StyleSheet.create({
     shadowOpacity: 0.4,
   },
   icon: {
-    height: 30,
-    width: 30,
+    height: 28,
+    width: 28,
   },
 });
 
-- 
cgit v1.2.3-70-g09d2


From 222c7ab62e57f7dec41d8a14de3768ee9a63fc8e Mon Sep 17 00:00:00 2001
From: Michael <michael.foiani@gmail.com>
Date: Fri, 2 Jul 2021 15:56:56 -0400
Subject: Remove comments added from pr review. Also, clean some code that was
 suggested from pr review.

---
 src/components/common/NavigationIcon.tsx | 19 ++++++++-----------
 src/routes/main/MainStackNavigator.tsx   |  4 ----
 src/routes/main/MainStackScreen.tsx      | 18 ------------------
 3 files changed, 8 insertions(+), 33 deletions(-)

(limited to 'src/components/common/NavigationIcon.tsx')

diff --git a/src/components/common/NavigationIcon.tsx b/src/components/common/NavigationIcon.tsx
index f97bb861..debb36b3 100644
--- a/src/components/common/NavigationIcon.tsx
+++ b/src/components/common/NavigationIcon.tsx
@@ -69,22 +69,15 @@ const NavigationIcon = (props: NavigationIconProps) => {
   return (
     <View style={styles.container}>
       <TouchableOpacity {...props}>
-        <Image source={imgSrc} style={getStyles(props.isBigger ?? false)} />
+        <Image
+          source={imgSrc}
+          style={props.isBigger ? styles.biggerIcon : styles.icon}
+        />
       </TouchableOpacity>
     </View>
   );
 };
 
-const getStyles = (isBigger: boolean) =>
-  isBigger ? biggerIconStyles.icon : styles.icon;
-
-const biggerIconStyles = StyleSheet.create({
-  icon: {
-    height: 44,
-    width: 44,
-  },
-});
-
 const styles = StyleSheet.create({
   container: {
     flex: 1,
@@ -101,6 +94,10 @@ const styles = StyleSheet.create({
     height: 28,
     width: 28,
   },
+  biggerIcon: {
+    height: 44,
+    width: 44,
+  },
 });
 
 export default NavigationIcon;
diff --git a/src/routes/main/MainStackNavigator.tsx b/src/routes/main/MainStackNavigator.tsx
index f12072e6..bc023da8 100644
--- a/src/routes/main/MainStackNavigator.tsx
+++ b/src/routes/main/MainStackNavigator.tsx
@@ -14,10 +14,6 @@ export type MainStackParams = {
   SuggestedPeople: {
     screenType: ScreenType;
   };
-  /*
-  Search: {
-    screenType: ScreenType;
-  }; */
   Upload: {
     screenType: ScreenType;
   };
diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx
index e19df2c2..948f37b8 100644
--- a/src/routes/main/MainStackScreen.tsx
+++ b/src/routes/main/MainStackScreen.tsx
@@ -26,7 +26,6 @@ import {
   PrivacyScreen,
   ProfileScreen,
   RequestContactsAccess,
-  // SearchScreen,
   SettingsScreen,
   SocialMediaTaggs,
   SuggestedPeopleScreen,
@@ -60,7 +59,6 @@ interface MainStackProps {
 const MainStackScreen: React.FC<MainStackProps> = ({route}) => {
   const {screenType} = route.params;
 
-  // const isSearchTab = screenType === ScreenType.Search;
   const isNotificationsTab = screenType === ScreenType.Notifications;
   const isSuggestedPeopleTab = screenType === ScreenType.SuggestedPeople;
   const isUploadTab = screenType === ScreenType.Upload;
@@ -69,9 +67,6 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => {
     switch (screenType) {
       case ScreenType.Profile:
         return 'Profile';
-      /*
-      case ScreenType.Search:
-        return 'Search'; */
       case ScreenType.Notifications:
         return 'Notifications';
       case ScreenType.SuggestedPeople:
@@ -103,19 +98,6 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => {
     animationEnabled: false,
   };
 
-  /*
-  Following was removed to eliminate search screen naviagtion
-
-  {isSearchTab && (
-    <MainStack.Screen
-      name="Search"
-      component={SearchScreen}
-      initialParams={{ screenType }}
-    />
-  )}
-
-  */
-
   const mainStackScreen = () => {
     return (
       <MainStack.Navigator
-- 
cgit v1.2.3-70-g09d2

