diff options
Diffstat (limited to 'src/routes')
| -rw-r--r-- | src/routes/main/MainStackNavigator.tsx | 4 | ||||
| -rw-r--r-- | src/routes/main/MainStackScreen.tsx | 29 | ||||
| -rw-r--r-- | src/routes/tabs/NavigationBar.tsx | 28 |
3 files changed, 43 insertions, 18 deletions
diff --git a/src/routes/main/MainStackNavigator.tsx b/src/routes/main/MainStackNavigator.tsx index a5d73988..f12072e6 100644 --- a/src/routes/main/MainStackNavigator.tsx +++ b/src/routes/main/MainStackNavigator.tsx @@ -14,8 +14,12 @@ export type MainStackParams = { SuggestedPeople: { screenType: ScreenType; }; + /* Search: { screenType: ScreenType; + }; */ + Upload: { + screenType: ScreenType; }; RequestContactsAccess: { screenType: ScreenType; diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx index 65a695f5..e19df2c2 100644 --- a/src/routes/main/MainStackScreen.tsx +++ b/src/routes/main/MainStackScreen.tsx @@ -26,7 +26,7 @@ import { PrivacyScreen, ProfileScreen, RequestContactsAccess, - SearchScreen, + // SearchScreen, SettingsScreen, SocialMediaTaggs, SuggestedPeopleScreen, @@ -60,22 +60,26 @@ interface MainStackProps { const MainStackScreen: React.FC<MainStackProps> = ({route}) => { const {screenType} = route.params; - const isSearchTab = screenType === ScreenType.Search; + // const isSearchTab = screenType === ScreenType.Search; const isNotificationsTab = screenType === ScreenType.Notifications; const isSuggestedPeopleTab = screenType === ScreenType.SuggestedPeople; + const isUploadTab = screenType === ScreenType.Upload; const initialRouteName = (() => { switch (screenType) { case ScreenType.Profile: return 'Profile'; + /* case ScreenType.Search: - return 'Search'; + return 'Search'; */ case ScreenType.Notifications: return 'Notifications'; case ScreenType.SuggestedPeople: return 'SuggestedPeople'; case ScreenType.Chat: return 'ChatList'; + case ScreenType.Upload: + return 'Upload'; } })(); @@ -99,6 +103,19 @@ 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 @@ -130,10 +147,10 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => { initialParams={{screenType}} /> )} - {isSearchTab && ( + {isUploadTab && ( <MainStack.Screen - name="Search" - component={SearchScreen} + name="Upload" + component={CameraScreen} initialParams={{screenType}} /> )} diff --git a/src/routes/tabs/NavigationBar.tsx b/src/routes/tabs/NavigationBar.tsx index c3a42739..12f6ab58 100644 --- a/src/routes/tabs/NavigationBar.tsx +++ b/src/routes/tabs/NavigationBar.tsx @@ -46,10 +46,16 @@ const NavigationBar: React.FC = () => { switch (route.name) { case 'Home': return <NavigationIcon tab="Home" disabled={!focused} />; - case 'Search': - return <NavigationIcon tab="Search" disabled={!focused} />; + case 'Chat': + return <NavigationIcon tab="Chat" disabled={!focused} />; case 'Upload': - return <NavigationIcon tab="Upload" disabled={!focused} />; + return ( + <NavigationIcon + tab="Upload" + disabled={!focused} + isBigger={true} + /> + ); case 'Notifications': return ( <NavigationIcon @@ -60,8 +66,6 @@ const NavigationBar: React.FC = () => { disabled={!focused} /> ); - case 'Chat': - return <NavigationIcon tab="Chat" disabled={!focused} />; case 'Profile': return <NavigationIcon tab="Profile" disabled={!focused} />; case 'SuggestedPeople': @@ -91,9 +95,14 @@ const NavigationBar: React.FC = () => { initialParams={{screenType: ScreenType.SuggestedPeople}} /> <Tabs.Screen - name="Search" + name="Chat" component={MainStackScreen} - initialParams={{screenType: ScreenType.Search}} + initialParams={{screenType: ScreenType.Chat}} + /> + <Tabs.Screen + name="Upload" + component={MainStackScreen} + initialParams={{screenType: ScreenType.Upload}} /> <Tabs.Screen name="Notifications" @@ -109,11 +118,6 @@ const NavigationBar: React.FC = () => { }} /> <Tabs.Screen - name="Chat" - component={MainStackScreen} - initialParams={{screenType: ScreenType.Chat}} - /> - <Tabs.Screen name="Profile" component={MainStackScreen} initialParams={{screenType: ScreenType.Profile}} |
