From 96fda980905d0c7a30813c364c6623dda695012f Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Fri, 29 Jan 2021 15:14:26 -0800 Subject: full screen; with button; needs refresh&alignment; --- src/screens/profile/FriendsListScreen.tsx | 67 ++++++++++++++++++++++++------- 1 file changed, 52 insertions(+), 15 deletions(-) (limited to 'src/screens') diff --git a/src/screens/profile/FriendsListScreen.tsx b/src/screens/profile/FriendsListScreen.tsx index f7192d10..ac3504d5 100644 --- a/src/screens/profile/FriendsListScreen.tsx +++ b/src/screens/profile/FriendsListScreen.tsx @@ -1,14 +1,21 @@ import React, {useState} from 'react'; -import {RouteProp} from '@react-navigation/native'; +import {RouteProp, useNavigation} from '@react-navigation/native'; import {TabsGradient, Friends, CenteredView} from '../../components'; import {ScrollView} from 'react-native-gesture-handler'; -import {SCREEN_HEIGHT} from '../../utils'; -import {StyleSheet, View} from 'react-native'; +import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; +import { + SafeAreaView, + StyleSheet, + Text, + TouchableOpacity, + View, +} from 'react-native'; import {ProfileStackParams} from '../../routes'; import {ProfilePreviewType} from '../../types'; import {EMPTY_PROFILE_PREVIEW_LIST} from '../../store/initialStates'; import {useSelector} from 'react-redux'; import {RootState} from '../../store/rootReducer'; +import BackIcon from '../../assets/icons/back-arrow.svg'; type FriendsListScreenRouteProp = RouteProp< ProfileStackParams, @@ -20,28 +27,39 @@ interface FriendsListScreenProps { const FriendsListScreen: React.FC = ({route}) => { const {userXId, screenType} = route.params; + const navigation = useNavigation(); const {friends} = userXId ? useSelector((state: RootState) => state.userX[screenType][userXId]) : useSelector((state: RootState) => state.friends); return ( - - - - - - - - + + + + { + navigation.pop(); + }}> + + + Friends + + + + + + + ); }; const styles = StyleSheet.create({ + background: { + backgroundColor: 'white', + height: '100%', + }, contentContainer: { paddingBottom: SCREEN_HEIGHT / 15, paddingHorizontal: 15, @@ -66,6 +84,25 @@ const styles = StyleSheet.create({ modalScrollView: { marginBottom: 10, }, + header: {justifyContent: 'center', padding: '3%'}, + headerText: { + position: 'absolute', + alignSelf: 'center', + fontSize: 20.5, + fontWeight: '600', + }, + headerButton: { + width: '5%', + aspectRatio: 1, + padding: 0, + marginLeft: '5%', + alignSelf: 'flex-start', + }, + body: { + width: SCREEN_WIDTH, + height: SCREEN_HEIGHT * 0.8, + paddingTop: '3%', + }, }); export default FriendsListScreen; -- cgit v1.2.3-70-g09d2