From 0eda9c024f57b131263c8191903eb5d1d8c2aa57 Mon Sep 17 00:00:00 2001 From: George Rusu Date: Wed, 19 May 2021 14:28:25 -0700 Subject: Find true center, add callback functionality --- src/components/taggs/TaggDraggable.tsx | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'src/components/taggs') diff --git a/src/components/taggs/TaggDraggable.tsx b/src/components/taggs/TaggDraggable.tsx index afd2a212..bd0d01bd 100644 --- a/src/components/taggs/TaggDraggable.tsx +++ b/src/components/taggs/TaggDraggable.tsx @@ -8,20 +8,11 @@ import { TouchableWithoutFeedback, View, } from 'react-native'; -import Draggable from 'react-native-draggable'; +import {useDispatch, useStore} from 'react-redux'; +import {RootState} from '../../store/rootReducer'; import {ScreenType, UserType} from '../../types'; -import { - normalize, - SCREEN_HEIGHT, - SCREEN_WIDTH, - navigateToProfile, -} from '../../utils'; +import {normalize, SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils'; import TaggAvatar from '../profile/TaggAvatar'; -import {RootState} from '../../store/rootReducer'; -import {useStore, useDispatch} from 'react-redux'; -import {Button} from 'react-native-share'; -import {userBlockFetched} from 'src/store/reducers'; -import {color} from 'react-native-reanimated'; interface TaggDraggableProps { draggable?: boolean; @@ -31,7 +22,7 @@ interface TaggDraggableProps { maxY: number; taggedUser: UserType; redirect: boolean; - deleteFromList: Function; + deleteFromList: () => void; } const TaggDraggable: React.FC = ( @@ -66,7 +57,7 @@ const TaggDraggable: React.FC = ( userXId={undefined} /> @{taggedUser.username} - + @@ -108,9 +99,11 @@ const styles = StyleSheet.create({ fontWeight: '700', lineHeight: normalize(13.13), letterSpacing: normalize(0.6), - paddingHorizontal: '3.8%', + paddingHorizontal: '1.5%', }, avatar: { + marginLeft: '4%', + marginRight: '-1%', flex: 0.45, aspectRatio: 1, }, @@ -128,6 +121,7 @@ const styles = StyleSheet.create({ imageX: { width: normalize(15), height: normalize(15), + marginRight: '-15%', }, pendingButtonTitle: { color: 'white', @@ -136,14 +130,13 @@ const styles = StyleSheet.create({ paddingLeft: 1, paddingTop: 3, paddingBottom: 3, - justifyContent: 'space-evenly', + // justifyContent: 'space-evenly', alignSelf: 'flex-start', alignItems: 'center', borderWidth: 1.5, borderRadius: 20, flexDirection: 'row', flexWrap: 'wrap', - borderColor: 'black', backgroundColor: 'rgba(0, 0, 0, 0.8)', }, }); -- cgit v1.2.3-70-g09d2