aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/onboarding/WaitlistSuccessScreen.tsx6
-rw-r--r--src/screens/profile/CaptionScreen.tsx12
-rw-r--r--src/screens/profile/FriendsListScreen.tsx14
3 files changed, 16 insertions, 16 deletions
diff --git a/src/screens/onboarding/WaitlistSuccessScreen.tsx b/src/screens/onboarding/WaitlistSuccessScreen.tsx
index 1f603e3a..f21672f1 100644
--- a/src/screens/onboarding/WaitlistSuccessScreen.tsx
+++ b/src/screens/onboarding/WaitlistSuccessScreen.tsx
@@ -10,12 +10,12 @@ import {
TouchableOpacity,
View,
} from 'react-native';
-import {ArrowButton, Background, SubmitButton} from '../../components';
+import CelebrationLogo from '../../assets/icons/celebration-logo.svg';
+import {ArrowButton, Background} from '../../components';
+import {TAGG_WEBSITE} from '../../constants';
import {OnboardingStackParams} from '../../routes';
import {BackgroundGradientType} from '../../types';
-import CelebrationLogo from '../../assets/icons/celebration-logo.svg';
import {SCREEN_HEIGHT} from '../../utils';
-import {TAGG_WEBSITE} from '../../constants';
type WaitlistSuccessScreenProp = StackNavigationProp<
OnboardingStackParams,
diff --git a/src/screens/profile/CaptionScreen.tsx b/src/screens/profile/CaptionScreen.tsx
index 998897e2..c039b8cb 100644
--- a/src/screens/profile/CaptionScreen.tsx
+++ b/src/screens/profile/CaptionScreen.tsx
@@ -48,8 +48,8 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
const [caption, setCaption] = useState('');
const [loading, setLoading] = useState(false);
- const handleCaptionUpdate = (caption: string) => {
- setCaption(caption);
+ const handleCaptionUpdate = (newCaption: string) => {
+ setCaption(newCaption);
};
const navigateToProfile = () => {
@@ -62,6 +62,9 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
const handleShare = async () => {
setLoading(true);
+ if (!image.filename) {
+ return;
+ }
postMoment(image.filename, image.path, caption, title, userId).then(
(data) => {
setLoading(false);
@@ -87,7 +90,7 @@ const CaptionScreen: React.FC<CaptionScreenProps> = ({route, navigation}) => {
<TouchableWithoutFeedback onPress={Keyboard.dismiss}>
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
- style={{flex: 1}}>
+ style={styles.flex}>
<View style={styles.contentContainer}>
<View style={styles.buttonsContainer}>
<Button
@@ -156,6 +159,9 @@ const styles = StyleSheet.create({
paddingVertical: '1%',
height: 60,
},
+ flex: {
+ flex: 1,
+ },
});
export default CaptionScreen;
diff --git a/src/screens/profile/FriendsListScreen.tsx b/src/screens/profile/FriendsListScreen.tsx
index 886ab9c4..1d10bc86 100644
--- a/src/screens/profile/FriendsListScreen.tsx
+++ b/src/screens/profile/FriendsListScreen.tsx
@@ -1,12 +1,6 @@
import {RouteProp} from '@react-navigation/native';
import React from 'react';
-import {
- SafeAreaView,
- ScrollView,
- StatusBar,
- StyleSheet,
- View,
-} from 'react-native';
+import {SafeAreaView, ScrollView, StatusBar, StyleSheet} from 'react-native';
import {useSelector} from 'react-redux';
import {Friends, TabsGradient} from '../../components';
import {MainStackParams} from '../../routes';
@@ -24,9 +18,9 @@ interface FriendsListScreenProps {
const FriendsListScreen: React.FC<FriendsListScreenProps> = ({route}) => {
const {userXId, screenType} = route.params;
- const {friends} = userXId
- ? useSelector((state: RootState) => state.userX[screenType][userXId])
- : useSelector((state: RootState) => state.friends);
+ const {friends} = useSelector((state: RootState) =>
+ userXId ? state.userX[screenType][userXId] : state.friends,
+ );
return (
<>