diff options
author | Ivan Chen <ivan@thetaggid.com> | 2020-11-09 12:05:08 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-09 12:05:08 -0500 |
commit | ea0b0a9730d2a5e410583f04c5d138a73d709a6c (patch) | |
tree | 841f4c262e21c3f0cae369ff1b182969d3e239b6 | |
parent | 2683938e0e194a129e1a24cfe9ccbd8af4390a01 (diff) |
removed coming soon (#113)
-rw-r--r-- | src/routes/tabs/NavigationBar.tsx | 51 | ||||
-rw-r--r-- | src/screens/search/SearchScreen.tsx | 5 |
2 files changed, 20 insertions, 36 deletions
diff --git a/src/routes/tabs/NavigationBar.tsx b/src/routes/tabs/NavigationBar.tsx index 21a1f7d2..67f842e0 100644 --- a/src/routes/tabs/NavigationBar.tsx +++ b/src/routes/tabs/NavigationBar.tsx @@ -1,7 +1,6 @@ import {createBottomTabNavigator} from '@react-navigation/bottom-tabs'; -import React from 'react'; +import React, {Fragment} from 'react'; import {NavigationIcon} from '../../components'; -import {Home, Notifications, Upload} from '../../screens'; import Profile from '../profile/Profile'; const Tabs = createBottomTabNavigator(); @@ -11,36 +10,19 @@ const NavigationBar: React.FC = () => { <Tabs.Navigator screenOptions={({route}) => ({ tabBarIcon: ({focused}) => { - if (route.name === 'Home') { - return focused ? ( - <NavigationIcon tab="Home" disabled={false} /> - ) : ( - <NavigationIcon tab="Home" disabled={true} /> - ); - } else if (route.name === 'Search') { - return focused ? ( - <NavigationIcon tab="Search" disabled={false} /> - ) : ( - <NavigationIcon tab="Search" disabled={true} /> - ); - } else if (route.name === 'Upload') { - return focused ? ( - <NavigationIcon tab="Upload" disabled={false} /> - ) : ( - <NavigationIcon tab="Upload" disabled={true} /> - ); - } else if (route.name === 'Notifications') { - return focused ? ( - <NavigationIcon tab="Notifications" disabled={false} /> - ) : ( - <NavigationIcon tab="Notifications" disabled={true} /> - ); - } else if (route.name === 'Profile') { - return focused ? ( - <NavigationIcon tab="Profile" disabled={false} /> - ) : ( - <NavigationIcon tab="Profile" disabled={true} /> - ); + switch (route.name) { + case 'Home': + return <NavigationIcon tab="Home" disabled={!focused} />; + case 'Search': + return <NavigationIcon tab="Search" disabled={!focused} />; + case 'Upload': + return <NavigationIcon tab="Upload" disabled={!focused} />; + case 'Notifications': + return <NavigationIcon tab="Notifications" disabled={!focused} />; + case 'Profile': + return <NavigationIcon tab="Profile" disabled={!focused} />; + default: + return <Fragment />; } }, })} @@ -56,9 +38,10 @@ const NavigationBar: React.FC = () => { bottom: '1%', }, }}> - <Tabs.Screen name="Home" component={Home} /> + {/* Removed for Alpha for now */} + {/* <Tabs.Screen name="Home" component={Home} /> <Tabs.Screen name="Notifications" component={Notifications} /> - <Tabs.Screen name="Upload" component={Upload} /> + <Tabs.Screen name="Upload" component={Upload} /> */} <Tabs.Screen name="Search" component={Profile} diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx index dfd7546f..f528358a 100644 --- a/src/screens/search/SearchScreen.tsx +++ b/src/screens/search/SearchScreen.tsx @@ -135,8 +135,9 @@ const SearchScreen: React.FC = () => { value={query} {...{top, searching}} /> + {/* Removed for Alpha for now */} {/* <Explore /> */} - <View> + {/* <View> <View style={styles.textContainer}> <Text style={styles.headerText}>Coming Soon</Text> <Text style={styles.subtext}> @@ -148,7 +149,7 @@ const SearchScreen: React.FC = () => { source={require('../../assets/images/coming-soon.png')} style={styles.image} /> - </View> + </View> */} <SearchResultsBackground {...{top}}> {results.length === 0 && recents.length !== 0 ? ( <RecentSearches |