diff options
Diffstat (limited to 'src/components/common')
-rw-r--r-- | src/components/common/AcceptDeclineButtons.tsx | 8 | ||||
-rw-r--r-- | src/components/common/FriendsButton.tsx | 9 | ||||
-rw-r--r-- | src/components/common/TaggPrompt.tsx | 14 |
3 files changed, 14 insertions, 17 deletions
diff --git a/src/components/common/AcceptDeclineButtons.tsx b/src/components/common/AcceptDeclineButtons.tsx index 7bb62fd4..fd42f2f5 100644 --- a/src/components/common/AcceptDeclineButtons.tsx +++ b/src/components/common/AcceptDeclineButtons.tsx @@ -1,19 +1,15 @@ import React from 'react'; import {StyleProp, StyleSheet, Text, View, ViewStyle} from 'react-native'; -import {TAGG_LIGHT_BLUE} from '../../constants'; -import {ProfilePreviewType} from '../../types'; -import {SCREEN_WIDTH} from '../../utils'; import {TouchableOpacity} from 'react-native-gesture-handler'; -import {normalize} from '../../utils'; +import {TAGG_LIGHT_BLUE} from '../../constants'; +import {normalize, SCREEN_WIDTH} from '../../utils'; interface AcceptDeclineButtonsProps { - requester: ProfilePreviewType; onAccept: () => void; onReject: () => void; externalStyles?: Record<string, StyleProp<ViewStyle>>; } const AcceptDeclineButtons: React.FC<AcceptDeclineButtonsProps> = ({ - requester, onAccept, onReject, externalStyles, diff --git a/src/components/common/FriendsButton.tsx b/src/components/common/FriendsButton.tsx index 6ddad93f..ae901229 100644 --- a/src/components/common/FriendsButton.tsx +++ b/src/components/common/FriendsButton.tsx @@ -31,9 +31,12 @@ const FriendsButton: React.FC<FriendsButtonProps> = ({ }) => { const dispatch = useDispatch(); - const {user = NO_USER, profile = NO_PROFILE} = userXId - ? useSelector((state: RootState) => state.userX[screenType][userXId]) - : useSelector((state: RootState) => state.user); + const { + user = NO_USER, + profile = NO_PROFILE, + } = useSelector((state: RootState) => + userXId ? state.userX[screenType][userXId] : state.user, + ); const {user: loggedInUser = NO_USER} = useSelector( (state: RootState) => state.user, diff --git a/src/components/common/TaggPrompt.tsx b/src/components/common/TaggPrompt.tsx index 5e125d00..6b59d4a5 100644 --- a/src/components/common/TaggPrompt.tsx +++ b/src/components/common/TaggPrompt.tsx @@ -1,8 +1,8 @@ -import * as React from 'react'; +import React from 'react'; import {StyleSheet, Text, TouchableOpacity} from 'react-native'; import {Image, View} from 'react-native-animatable'; import CloseIcon from '../../assets/ionicons/close-outline.svg'; -import {isIPhoneX, normalize, SCREEN_HEIGHT} from '../../utils'; +import {normalize, SCREEN_HEIGHT} from '../../utils'; type TaggPromptProps = { messageHeader: string; @@ -39,13 +39,11 @@ const TaggPrompt: React.FC<TaggPromptProps> = ({ } }; + const topPadding = {paddingTop: noPadding ? 0 : SCREEN_HEIGHT / 10}; + const bottomPadding = {paddingBottom: noPadding ? 0 : SCREEN_HEIGHT / 50}; + return ( - <View - style={[ - styles.container, - {paddingTop: noPadding ? 0 : SCREEN_HEIGHT / 10}, - {paddingBottom: noPadding ? 0 : SCREEN_HEIGHT / 50}, - ]}> + <View style={[styles.container, topPadding, bottomPadding]}> <Image style={styles.icon} source={logo()} /> <Text style={styles.header}>{messageHeader}</Text> <Text style={styles.subtext}>{messageBody}</Text> |