aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-05-20 14:00:28 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-05-20 17:58:15 -0700
commitb8167487f9b069262459efd81b8860ddf615df13 (patch)
tree45720fcbbfdd9f287a9f8083d24afd4a5506ae60 /src/screens
parent161e78651737208ddfb898f9fbf5250d8debf061 (diff)
Change screen name
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/moments/TagSelectionScreen.tsx (renamed from src/screens/moments/TagSelection.tsx)20
-rw-r--r--src/screens/moments/index.ts2
-rw-r--r--src/screens/profile/CaptionScreen.tsx8
3 files changed, 18 insertions, 12 deletions
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>