diff options
Diffstat (limited to 'src/routes/main/MainStackScreen.tsx')
-rw-r--r-- | src/routes/main/MainStackScreen.tsx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx index 3e425101..8042d267 100644 --- a/src/routes/main/MainStackScreen.tsx +++ b/src/routes/main/MainStackScreen.tsx @@ -12,6 +12,7 @@ import { MomentUploadPromptScreen, NotificationsScreen, ProfileScreen, + RequestContactsAccess, SearchScreen, SocialMediaTaggs, } from '../../screens'; @@ -47,7 +48,14 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => { case ScreenType.Profile: return 'Profile'; case ScreenType.Search: - return 'Search'; + // Check if user responded to access contacts and return appropriate screen + // When app is opened, load the value from Async Storage to react native store + // Every time the user clicks on this tab + // Retrieve the information from the store + // If responded is true, show search screen + // Else, show RequestContactsAccess + // If user responds, update store and Async and remove popup + return 'RequestContactsAccess'; case ScreenType.Notifications: return 'Notifications'; } @@ -91,9 +99,14 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => { }} /> {isSearchTab && ( + // <MainStack.Screen + // name="Search" + // component={SearchScreen} + // initialParams={{screenType}} + // /> <MainStack.Screen - name="Search" - component={SearchScreen} + name="RequestContactsAccess" + component={RequestContactsAccess} initialParams={{screenType}} /> )} |