diff options
-rw-r--r-- | src/routes/main/MainStackNavigator.tsx | 2 | ||||
-rw-r--r-- | src/routes/main/MainStackScreen.tsx | 6 | ||||
-rw-r--r-- | src/screens/moments/TagSelectionScreen.tsx (renamed from src/screens/moments/TagSelection.tsx) | 20 | ||||
-rw-r--r-- | src/screens/moments/index.ts | 2 | ||||
-rw-r--r-- | src/screens/profile/CaptionScreen.tsx | 8 |
5 files changed, 22 insertions, 16 deletions
diff --git a/src/routes/main/MainStackNavigator.tsx b/src/routes/main/MainStackNavigator.tsx index 67be9e46..a8da3030 100644 --- a/src/routes/main/MainStackNavigator.tsx +++ b/src/routes/main/MainStackNavigator.tsx @@ -101,7 +101,7 @@ export type MainStackParams = { ChatList: undefined; Chat: undefined; NewChatModal: undefined; - TagSelection: { + TagSelectionScreen: { selectedUsers: ProfilePreviewType[]; }; }; diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx index d18d11c6..61491641 100644 --- a/src/routes/main/MainStackScreen.tsx +++ b/src/routes/main/MainStackScreen.tsx @@ -32,7 +32,7 @@ import { SuggestedPeopleScreen, SuggestedPeopleUploadPictureScreen, SuggestedPeopleWelcomeScreen, - TagSelection, + TagSelectionScreen, } from '../../screens'; import MutualBadgeHolders from '../../screens/suggestedPeople/MutualBadgeHolders'; import {ScreenType} from '../../types'; @@ -312,8 +312,8 @@ const MainStackScreen: React.FC<MainStackProps> = ({route}) => { options={{headerShown: false, ...newChatModalStyle}} /> <MainStack.Screen - name="TagSelection" - component={TagSelection} + name="TagSelectionScreen" + component={TagSelectionScreen} options={{ ...headerBarOptions('black', ''), }} diff --git a/src/screens/moments/TagSelection.tsx b/src/screens/moments/TagSelectionScreen.tsx index 83b0551a..6920c75c 100644 --- a/src/screens/moments/TagSelection.tsx +++ b/src/screens/moments/TagSelectionScreen.tsx @@ -22,12 +22,15 @@ import { SCREEN_WIDTH, } from '../../utils'; -type TagSelectionRouteProps = RouteProp<MainStackParams, 'TagSelection'>; -interface TagSelectionProps { - route: TagSelectionRouteProps; +type TagSelectionScreenRouteProps = RouteProp< + MainStackParams, + 'TagSelectionScreen' +>; +interface TagSelectionScreenProps { + route: TagSelectionScreenRouteProps; } -const TagSelection: React.FC<TagSelectionProps> = ({route}) => { +const TagSelectionScreen: React.FC<TagSelectionScreenProps> = ({route}) => { const navigation = useNavigation(); const [users, setUsers] = useState<ProfilePreviewType[]>([]); const [selectedUsers, setSelectedUsers] = useState<ProfilePreviewType[]>( @@ -37,6 +40,9 @@ const TagSelection: React.FC<TagSelectionProps> = ({route}) => { const [query, setQuery] = useState<string>(''); const [label, setLabel] = useState<string>('Recent'); + /* + * + */ useEffect(() => { navigation.setOptions({ headerLeft: () => ( @@ -44,8 +50,10 @@ const TagSelection: React.FC<TagSelectionProps> = ({route}) => { onPress={() => { if (selectedUsers.length > 0) { navigation.setParams({selectedUsers: selectedUsers}); + navigation.navigate('CaptionScreen'); + } else { + navigation.goBack(); } - navigation.goBack(); }}> <BackIcon height={normalize(18)} @@ -140,7 +148,7 @@ const TagSelection: React.FC<TagSelectionProps> = ({route}) => { ); }; -export default TagSelection; +export default TagSelectionScreen; const styles = StyleSheet.create({ safeAreaView: { diff --git a/src/screens/moments/index.ts b/src/screens/moments/index.ts index f2f4cbc5..3cdd3128 100644 --- a/src/screens/moments/index.ts +++ b/src/screens/moments/index.ts @@ -1 +1 @@ -export {default as TagSelection} from './TagSelection'; +export {default as TagSelectionScreen} from './TagSelectionScreen'; diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx index bc7c9ed0..4fa81f8c 100644 --- a/src/screens/profile/CaptionScreen.tsx +++ b/src/screens/profile/CaptionScreen.tsx @@ -126,17 +126,15 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => { onChange={setCaption} partTypes={mentionPartTypes('blue')} /> + {/* TODO: Add tag friends component */} <TouchableOpacity style={{width: SCREEN_WIDTH}} onPress={() => - navigation.navigate('TagSelection', { + navigation.navigate('TagSelectionScreen', { selectedUsers: taggedUsers, }) }> - {/* TODO: Add tag friends component */} - <Text style={{color: 'white', fontSize: normalize(14)}}> - Tag Friends - </Text> + <Text style={styles.tagFriendsTitle}>Tag Friends</Text> </TouchableOpacity> {/* TODO: Display tagged friends component */} </View> |