From 602ff2ced6176a46e5d219d38e8e4f64a4a61f56 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 21 May 2021 16:13:16 -0700 Subject: Add new Tag Friends Screen --- src/screens/moments/TagFriendsScreen.tsx | 212 +++++++++++++++++++++++++++++++ src/screens/moments/index.ts | 1 + 2 files changed, 213 insertions(+) create mode 100644 src/screens/moments/TagFriendsScreen.tsx (limited to 'src/screens') diff --git a/src/screens/moments/TagFriendsScreen.tsx b/src/screens/moments/TagFriendsScreen.tsx new file mode 100644 index 00000000..54da94ee --- /dev/null +++ b/src/screens/moments/TagFriendsScreen.tsx @@ -0,0 +1,212 @@ +import {RouteProp} from '@react-navigation/core'; +import {useNavigation} from '@react-navigation/native'; +import React, {Fragment, useEffect, useState} from 'react'; +import { + Image, + Keyboard, + KeyboardAvoidingView, + Platform, + StyleSheet, + Text, + TouchableOpacity, + TouchableWithoutFeedback, + View, +} from 'react-native'; +import {Button} from 'react-native-elements'; +import {MainStackParams} from 'src/routes'; +import { + CaptionScreenHeader, + ProfilePreview, + SearchBackground, + TaggLoadingIndicator, +} from '../../components'; +import {TAGG_LIGHT_BLUE_2} from '../../constants'; +import {ProfilePreviewType, ScreenType} from '../../types'; +import {normalize, SCREEN_WIDTH, StatusBarHeight} from '../../utils'; + +type TagFriendsScreenRouteProps = RouteProp< + MainStackParams, + 'TagFriendsScreen' +>; +interface TagFriendsScreenProps { + route: TagFriendsScreenRouteProps; +} +const TagFriendsScreen: React.FC = ({route}) => { + const {image, selectedUsers} = route.params; + const navigation = useNavigation(); + const [loading, setLoading] = useState(false); + const [taggedUsers, setTaggedUsers] = useState([]); + + useEffect(() => { + setTaggedUsers(selectedUsers ? selectedUsers : []); + }, [route.params]); + + /* + * Navigate back to Tag Users Screen, send selected users + */ + const handleDone = () => { + navigation.navigate('CaptionScreen', { + ...route.params, + selectedUsers: taggedUsers, + }); + }; + + return ( + + {loading ? : } + + + + +