aboutsummaryrefslogtreecommitdiff
path: root/src/components/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/common')
-rw-r--r--src/components/common/AcceptDeclineButtons.tsx8
-rw-r--r--src/components/common/AvatarTitle.tsx2
-rw-r--r--src/components/common/FriendsButton.tsx9
-rw-r--r--src/components/common/TaggLoadingIndicator.tsx2
-rw-r--r--src/components/common/TaggPrompt.tsx14
5 files changed, 16 insertions, 19 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/AvatarTitle.tsx b/src/components/common/AvatarTitle.tsx
index a38f46fa..81351327 100644
--- a/src/components/common/AvatarTitle.tsx
+++ b/src/components/common/AvatarTitle.tsx
@@ -8,7 +8,7 @@ type AvatarTitleProps = {
};
const AvatarTitle: React.FC<AvatarTitleProps> = ({avatar}) => {
return (
- <View style={[styles.container]}>
+ <View style={styles.container}>
<LinearGradient
colors={[TAGGS_GRADIENT.start, TAGGS_GRADIENT.end]}
useAngle={true}
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/TaggLoadingIndicator.tsx b/src/components/common/TaggLoadingIndicator.tsx
index 91c68622..a829cb6f 100644
--- a/src/components/common/TaggLoadingIndicator.tsx
+++ b/src/components/common/TaggLoadingIndicator.tsx
@@ -3,7 +3,7 @@ import {Image, StyleSheet, View} from 'react-native';
import {SCREEN_HEIGHT, SCREEN_WIDTH} from '../../utils';
interface TaggLoadingIndicatorProps {
- fullscreen: boolean;
+ fullscreen?: boolean;
}
const TaggLoadingIndicator: React.FC<TaggLoadingIndicatorProps> = ({
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>