aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/comments/CommentsCount.tsx39
-rw-r--r--src/components/comments/ZoomInCropper.tsx3
-rw-r--r--src/components/moments/MomentPost.tsx4
-rw-r--r--src/components/profile/MomentMoreInfoDrawer.tsx1
-rw-r--r--src/screens/main/NotificationsScreen.tsx5
-rw-r--r--src/screens/onboarding/BasicInfoOnboarding.tsx5
-rw-r--r--src/screens/profile/IndividualMoment.tsx16
7 files changed, 34 insertions, 39 deletions
diff --git a/src/components/comments/CommentsCount.tsx b/src/components/comments/CommentsCount.tsx
index cb30fe76..90514193 100644
--- a/src/components/comments/CommentsCount.tsx
+++ b/src/components/comments/CommentsCount.tsx
@@ -1,6 +1,6 @@
import {useNavigation} from '@react-navigation/core';
import React from 'react';
-import {Text} from 'react-native';
+import {StyleSheet, Text} from 'react-native';
import {TouchableOpacity} from 'react-native-gesture-handler';
import CommentsIcon from '../../assets/icons/moment-comment-icon.svg';
import {MomentPostType, ScreenType} from '../../types';
@@ -15,12 +15,7 @@ const CommentsCount: React.FC<CommentsCountProps> = ({moment, screenType}) => {
const navigation = useNavigation();
return (
<TouchableOpacity
- style={{
- minWidth: 50,
- flexDirection: 'column',
- justifyContent: 'center',
- alignItems: 'center',
- }}
+ style={styles.countContainer}
onPress={() =>
navigation.navigate('MomentCommentsScreen', {
moment_id: moment.moment_id,
@@ -28,20 +23,26 @@ const CommentsCount: React.FC<CommentsCountProps> = ({moment, screenType}) => {
})
}>
<CommentsIcon width={25} height={25} />
- <Text
- style={{
- fontWeight: '500',
- fontSize: normalize(11),
- lineHeight: normalize(13),
- letterSpacing: normalize(0.05),
- textAlign: 'center',
- color: 'white',
- marginTop: normalize(5),
- }}>
- {moment.comments_count}
- </Text>
+ <Text style={styles.count}>{moment.comments_count}</Text>
</TouchableOpacity>
);
};
+const styles = StyleSheet.create({
+ countContainer: {
+ minWidth: 50,
+ flexDirection: 'column',
+ justifyContent: 'center',
+ alignItems: 'center',
+ },
+ count: {
+ fontWeight: '500',
+ fontSize: normalize(11),
+ lineHeight: normalize(13),
+ letterSpacing: normalize(0.05),
+ textAlign: 'center',
+ color: 'white',
+ marginTop: normalize(5),
+ },
+});
export default CommentsCount;
diff --git a/src/components/comments/ZoomInCropper.tsx b/src/components/comments/ZoomInCropper.tsx
index f3fb5c05..25301e6a 100644
--- a/src/components/comments/ZoomInCropper.tsx
+++ b/src/components/comments/ZoomInCropper.tsx
@@ -130,7 +130,7 @@ export const ZoomInCropper: React.FC<ZoomInCropperProps> = ({
<CloseIcon height={25} width={25} color={'white'} />
</TouchableOpacity>
<ImageZoom
- style={{backgroundColor: 'black'}}
+ style={styles.zoomView}
cropWidth={SCREEN_WIDTH}
cropHeight={SCREEN_HEIGHT}
imageWidth={SCREEN_WIDTH}
@@ -180,4 +180,5 @@ const styles = StyleSheet.create({
letterSpacing: normalize(1.3),
textAlign: 'center',
},
+ zoomView: {backgroundColor: 'black'},
});
diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx
index 26490315..e069089c 100644
--- a/src/components/moments/MomentPost.tsx
+++ b/src/components/moments/MomentPost.tsx
@@ -236,13 +236,13 @@ const MomentPost: React.FC<MomentPostProps> = ({
value: moment.caption,
styles: styles.captionText,
partTypes: mentionPartTypes('white'),
- onPress: (user: UserType) =>
+ onPress: (userLocal: UserType) =>
navigateToProfile(
state,
dispatch,
navigation,
screenType,
- user,
+ userLocal,
),
})}
</>
diff --git a/src/components/profile/MomentMoreInfoDrawer.tsx b/src/components/profile/MomentMoreInfoDrawer.tsx
index a8adcfda..dc4ebe32 100644
--- a/src/components/profile/MomentMoreInfoDrawer.tsx
+++ b/src/components/profile/MomentMoreInfoDrawer.tsx
@@ -3,7 +3,6 @@ import React, {useEffect, useState} from 'react';
import {
Alert,
GestureResponderEvent,
- StyleSheet,
TextStyle,
TouchableOpacity,
ViewProps,
diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx
index 03842b0a..84c15f66 100644
--- a/src/screens/main/NotificationsScreen.tsx
+++ b/src/screens/main/NotificationsScreen.tsx
@@ -36,8 +36,9 @@ const NotificationsScreen: React.FC = () => {
);
const [refreshing, setRefreshing] = useState(false);
// used for figuring out which ones are unread
- const [lastViewed, setLastViewed] =
- useState<moment.Moment | undefined>(undefined);
+ const [lastViewed, setLastViewed] = useState<moment.Moment | undefined>(
+ undefined,
+ );
const {notifications} = useSelector(
(state: RootState) => state.notifications,
);
diff --git a/src/screens/onboarding/BasicInfoOnboarding.tsx b/src/screens/onboarding/BasicInfoOnboarding.tsx
index d5998ac1..4c8da021 100644
--- a/src/screens/onboarding/BasicInfoOnboarding.tsx
+++ b/src/screens/onboarding/BasicInfoOnboarding.tsx
@@ -71,8 +71,9 @@ const BasicInfoOnboarding: React.FC<BasicInfoOnboardingProps> = ({route}) => {
const [invalidWithError, setInvalidWithError] = useState(
'Please enter a valid ',
);
- const [autoCapitalize, setAutoCap] =
- useState<'none' | 'sentences' | 'words' | 'characters' | undefined>('none');
+ const [autoCapitalize, setAutoCap] = useState<
+ 'none' | 'sentences' | 'words' | 'characters' | undefined
+ >('none');
const [fadeValue, setFadeValue] = useState<Animated.Value<number>>(
new Animated.Value(0),
);
diff --git a/src/screens/profile/IndividualMoment.tsx b/src/screens/profile/IndividualMoment.tsx
index 2ad22db4..ca31ad5b 100644
--- a/src/screens/profile/IndividualMoment.tsx
+++ b/src/screens/profile/IndividualMoment.tsx
@@ -1,19 +1,14 @@
import {RouteProp} from '@react-navigation/native';
import {StackNavigationProp} from '@react-navigation/stack';
import React, {useEffect, useRef, useState} from 'react';
-import {FlatList, Keyboard, StyleSheet} from 'react-native';
+import {FlatList, Keyboard} from 'react-native';
import {useSelector} from 'react-redux';
import {MomentPost, TabsGradient} from '../../components';
import {AVATAR_DIM} from '../../constants';
import {MainStackParams} from '../../routes';
import {RootState} from '../../store/rootreducer';
import {MomentPostType} from '../../types';
-import {
- isIPhoneX,
- normalize,
- SCREEN_HEIGHT,
- StatusBarHeight,
-} from '../../utils';
+import {isIPhoneX} from '../../utils';
/**
* Individual moment view opened when user clicks on a moment tile
@@ -38,10 +33,7 @@ interface IndividualMomentProps {
navigation: IndividualMomentNavigationProp;
}
-const IndividualMoment: React.FC<IndividualMomentProps> = ({
- route,
- navigation,
-}) => {
+const IndividualMoment: React.FC<IndividualMomentProps> = ({route}) => {
const {
userXId,
screenType,
@@ -86,7 +78,7 @@ const IndividualMoment: React.FC<IndividualMomentProps> = ({
<FlatList
ref={scrollRef}
data={momentData}
- renderItem={({item, index}) => (
+ renderItem={({item}) => (
<MomentPost
key={item.moment_id}
moment={item}