import React from 'react'; import {View, StyleSheet, Text, ScrollView} from 'react-native'; import {ProfilePreviewType, ScreenType} from '../../types'; import {ProfilePreview} from '..'; import {useNavigation} from '@react-navigation/native'; import {Button} from 'react-native-elements'; import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; import {TAGG_LIGHT_BLUE} from '../../constants'; import {RootState} from '../../store/rootReducer'; import {useDispatch, useStore} from 'react-redux'; import {handleUnfriend} from '../../utils/friends'; interface FriendsProps { result: Array; screenType: ScreenType; userXId: string; } const Friends: React.FC = ({result, screenType, userXId}) => { const navigation = useNavigation(); const state: RootState = useStore().getState(); const dispatch = useDispatch(); return ( {result.map((profilePreview) => (