From d85eaeb878cbbeedda860ee5809b81100c910af2 Mon Sep 17 00:00:00 2001 From: Ashm Walia Date: Sat, 16 Jan 2021 09:44:41 -0800 Subject: Done --- src/components/profile/ProfileBody.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/components/profile/ProfileBody.tsx') diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx index 4076e473..64aec09c 100644 --- a/src/components/profile/ProfileBody.tsx +++ b/src/components/profile/ProfileBody.tsx @@ -57,15 +57,9 @@ const ProfileBody: React.FC = ({ const dispatch = useDispatch(); const handleAcceptRequest = async () => { - try { - await dispatch( - acceptFriendRequest({id, username, first_name, last_name}), - ); - await dispatch(updateUserXFriends(id, state)); - dispatch(updateUserXProfileAllScreens(id, state)); - } catch (err) { - console.log(err); - } + await dispatch(acceptFriendRequest({id, username, first_name, last_name})); + await dispatch(updateUserXFriends(id, state)); + dispatch(updateUserXProfileAllScreens(id, state)); }; const handleDeclineFriendRequest = async () => { @@ -144,6 +138,12 @@ const ProfileBody: React.FC = ({ }; const styles = StyleSheet.create({ + toggleButtonContainer: { + flexDirection: 'row', + flex: 1, + paddingTop: '3.5%', + paddingBottom: '2%', + }, acceptRejectContainer: { flexDirection: 'row', }, -- cgit v1.2.3-70-g09d2