From de4328dfd5d91cc1b0157e748975d8bc079491f0 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Thu, 11 Feb 2021 14:08:05 -0500 Subject: massive friends button cleanup --- src/components/profile/ProfileBody.tsx | 100 ++++++--------------------------- 1 file changed, 16 insertions(+), 84 deletions(-) (limited to 'src/components/profile') diff --git a/src/components/profile/ProfileBody.tsx b/src/components/profile/ProfileBody.tsx index 106b20a7..646be3e0 100644 --- a/src/components/profile/ProfileBody.tsx +++ b/src/components/profile/ProfileBody.tsx @@ -1,28 +1,24 @@ import React from 'react'; -import {StyleSheet, View, Text, LayoutChangeEvent, Linking} from 'react-native'; -import {Button, normalize} from 'react-native-elements'; +import {LayoutChangeEvent, Linking, StyleSheet, Text, View} from 'react-native'; +import {normalize} from 'react-native-elements'; +import {useDispatch, useSelector, useStore} from 'react-redux'; import { TAGG_DARK_BLUE, TAGG_LIGHT_BLUE, TOGGLE_BUTTON_TYPE, } from '../../constants'; -import ToggleButton from './ToggleButton'; -import {RootState} from '../../store/rootReducer'; -import {useDispatch, useSelector, useStore} from 'react-redux'; -import {ScreenType} from '../../types'; -import {NO_PROFILE, NO_USER} from '../../store/initialStates'; -import { - getUserAsProfilePreviewType, - handleFriendUnfriend, - SCREEN_WIDTH, -} from '../../utils'; -import {AcceptDeclineButtons, FriendsButton} from '../common'; import { acceptFriendRequest, declineFriendRequest, updateUserXFriends, updateUserXProfileAllScreens, } from '../../store/actions'; +import {NO_PROFILE, NO_USER} from '../../store/initialStates'; +import {RootState} from '../../store/rootReducer'; +import {ScreenType} from '../../types'; +import {getUserAsProfilePreviewType, SCREEN_WIDTH} from '../../utils'; +import {FriendsButton} from '../common'; +import ToggleButton from './ToggleButton'; interface ProfileBodyProps { onLayout: (event: LayoutChangeEvent) => void; @@ -99,37 +95,13 @@ const ProfileBody: React.FC = ({ )} {userXId && !isBlocked && ( - - {(friendship_status === 'requested' && - friendship_requester_id !== userXId && ( -