From 20f1e9baf084ddaf126f625c6fba6f8a2b3f060b Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 26 Mar 2021 15:54:43 -0400 Subject: done --- src/components/moments/Moment.tsx | 105 +++++++++++++++++++++----------------- 1 file changed, 57 insertions(+), 48 deletions(-) (limited to 'src') diff --git a/src/components/moments/Moment.tsx b/src/components/moments/Moment.tsx index 2ac6aebb..0ceb8542 100644 --- a/src/components/moments/Moment.tsx +++ b/src/components/moments/Moment.tsx @@ -1,11 +1,10 @@ import {useNavigation} from '@react-navigation/native'; -import React, {Fragment} from 'react'; +import React from 'react'; import {Alert, StyleProp, StyleSheet, View, ViewStyle} from 'react-native'; import {Text} from 'react-native-animatable'; import {ScrollView, TouchableOpacity} from 'react-native-gesture-handler'; import ImagePicker from 'react-native-image-crop-picker'; import LinearGradient from 'react-native-linear-gradient'; -import {MomentType, ScreenType} from '../../types'; import DeleteIcon from '../../assets/icons/delete-logo.svg'; import DownIcon from '../../assets/icons/down_icon.svg'; import PlusIcon from '../../assets/icons/plus_icon-01.svg'; @@ -13,6 +12,7 @@ import BigPlusIcon from '../../assets/icons/plus_icon-02.svg'; import UpIcon from '../../assets/icons/up_icon.svg'; import {TAGG_LIGHT_BLUE} from '../../constants'; import {ERROR_UPLOAD} from '../../constants/strings'; +import {MomentType, ScreenType} from '../../types'; import {normalize, SCREEN_WIDTH} from '../../utils'; import MomentTile from './MomentTile'; @@ -77,55 +77,54 @@ const Moment: React.FC = ({ return ( - + {title} - {!userXId ? ( - - {showUpButton && move && ( - move('up', title)} - color={TAGG_LIGHT_BLUE} - style={{marginHorizontal: 4}} - /> - )} - {showDownButton && move && ( - move('down', title)} + + {!userXId && ( + + {showUpButton && move && ( + move('up', title)} + color={TAGG_LIGHT_BLUE} + style={styles.horizontalMargin} + /> + )} + {showDownButton && move && ( + move('down', title)} + color={TAGG_LIGHT_BLUE} + style={styles.horizontalMargin} + /> + )} + + )} + {!userXId && ( + + navigateToImagePicker()} color={TAGG_LIGHT_BLUE} - style={{marginHorizontal: 4}} - /> - )} - - ) : ( - - )} - {/* */} - {!userXId ? ( - - navigateToImagePicker()} - color={TAGG_LIGHT_BLUE} - style={{marginHorizontal: 4}} - /> - {shouldAllowDeletion && ( - handleMomentCategoryDelete(title)} - width={19} - height={19} - style={{marginHorizontal: 4}} + style={styles.horizontalMargin} /> - )} - - ) : ( - - )} + {shouldAllowDeletion && ( + handleMomentCategoryDelete(title)} + width={19} + height={19} + style={[styles.horizontalMargin, styles.deleButtonAdjustment]} + /> + )} + + )} +