aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-07-27 14:49:58 -0400
committerIvan Chen <ivan@tagg.id>2021-07-29 14:05:01 -0400
commitad98ad617d78c7b68ffc37327f21a8769fcaab57 (patch)
tree9f9be41dc112d22865c834f3550e8d17e601c54a
parent265814c782e4196bf57cd2fb507f80546498618e (diff)
Fix styling, Cleanup imports
-rw-r--r--src/components/moments/IndividualMomentTitleBar.tsx53
-rw-r--r--src/components/moments/MomentPost.tsx5
-rw-r--r--src/components/moments/index.ts1
-rw-r--r--src/routes/main/MainStackScreen.tsx19
-rw-r--r--src/screens/suggestedPeople/index.ts1
5 files changed, 14 insertions, 65 deletions
diff --git a/src/components/moments/IndividualMomentTitleBar.tsx b/src/components/moments/IndividualMomentTitleBar.tsx
deleted file mode 100644
index c6bf1423..00000000
--- a/src/components/moments/IndividualMomentTitleBar.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import React from 'react';
-import {StyleSheet, Text, View, ViewProps} from 'react-native';
-import {normalize, SCREEN_WIDTH} from '../../utils';
-
-interface IndividualMomentTitleBarProps extends ViewProps {
- title: string;
-}
-const IndividualMomentTitleBar: React.FC<IndividualMomentTitleBarProps> = ({
- title,
-}) => {
- return (
- <View style={styles.mainContainer}>
- <View style={styles.titleContainer}>
- <Text
- style={[
- styles.title,
- {
- fontSize: title.length > 18 ? normalize(14) : normalize(16),
- },
- ]}>
- {title}
- </Text>
- </View>
- </View>
- );
-};
-
-const styles = StyleSheet.create({
- title: {
- textAlign: 'center',
- color: 'white',
- fontSize: normalize(18),
- fontWeight: '700',
- lineHeight: normalize(21.48),
- letterSpacing: normalize(1.3),
- },
- titleContainer: {
- width: '80%',
- position: 'absolute',
- left: '10%',
- right: '10%',
- height: normalize(70),
- },
- mainContainer: {
- flex: 1,
- width: SCREEN_WIDTH * 0.6,
- flexDirection: 'row',
- justifyContent: 'flex-end',
- marginVertical: '2%',
- },
-});
-
-export default IndividualMomentTitleBar;
diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx
index 921f7693..2257f8ac 100644
--- a/src/components/moments/MomentPost.tsx
+++ b/src/components/moments/MomentPost.tsx
@@ -134,10 +134,7 @@ const MomentPost: React.FC<MomentPostProps> = ({
useEffect(
() =>
navigation.setOptions({
- ...headerBarOptions('white', ''),
- headerTitle: () => (
- <IndividualMomentTitleBar title={moment.moment_category} />
- ),
+ ...headerBarOptions('white', moment.moment_category),
}),
[moment.moment_id],
);
diff --git a/src/components/moments/index.ts b/src/components/moments/index.ts
index 3f33ec53..4c1c509e 100644
--- a/src/components/moments/index.ts
+++ b/src/components/moments/index.ts
@@ -1,4 +1,3 @@
-export {default as IndividualMomentTitleBar} from './IndividualMomentTitleBar';
export {default as CaptionScreenHeader} from './CaptionScreenHeader';
export {default as Moment} from './Moment';
export {default as TagFriendsFooter} from './TagFriendsFoooter';
diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx
index 064e9725..ccfc4cbd 100644
--- a/src/routes/main/MainStackScreen.tsx
+++ b/src/routes/main/MainStackScreen.tsx
@@ -2,25 +2,28 @@ import {RouteProp} from '@react-navigation/native';
import {StackNavigationOptions} from '@react-navigation/stack';
import React from 'react';
import {StyleSheet, Text} from 'react-native';
-import {normalize} from 'react-native-elements';
import BackIcon from '../../assets/icons/back-arrow.svg';
import {
AccountType,
AnimatedTutorial,
BadgeSelection,
+ CameraScreen,
CaptionScreen,
CategorySelection,
ChatListScreen,
ChatScreen,
+ ChoosingCategoryScreen,
CommentReactionScreen,
CreateCustomCategory,
DiscoverUsers,
+ EditMedia,
EditProfile,
FriendsListScreen,
IndividualMoment,
InviteFriendsScreen,
MomentCommentsScreen,
MomentUploadPromptScreen,
+ MutualBadgeHolders,
NewChatModal,
NotificationsScreen,
PrivacyScreen,
@@ -31,16 +34,17 @@ import {
SuggestedPeopleScreen,
SuggestedPeopleUploadPictureScreen,
SuggestedPeopleWelcomeScreen,
- TagSelectionScreen,
TagFriendsScreen,
- CameraScreen,
- EditMedia,
+ TagSelectionScreen,
} from '../../screens';
-import MutualBadgeHolders from '../../screens/suggestedPeople/MutualBadgeHolders';
import {ScreenType} from '../../types';
-import {AvatarHeaderHeight, ChatHeaderHeight, SCREEN_WIDTH} from '../../utils';
+import {
+ AvatarHeaderHeight,
+ ChatHeaderHeight,
+ normalize,
+ SCREEN_WIDTH,
+} from '../../utils';
import {MainStack, MainStackParams} from './MainStackNavigator';
-import ChoosingCategoryScreen from '../../screens/profile/ChoosingCategoryScreen';
/**
* Profile : To display the logged in user's profile when the userXId passed in to it is (undefined | null | empty string) else displays profile of the user being visited.
@@ -413,6 +417,7 @@ const styles = StyleSheet.create({
shadowOffset: {width: 0, height: 0},
},
headerTitle: {
+ textAlign: 'center',
letterSpacing: normalize(1.3),
fontWeight: '700',
},
diff --git a/src/screens/suggestedPeople/index.ts b/src/screens/suggestedPeople/index.ts
index 8c06d81e..be2393b5 100644
--- a/src/screens/suggestedPeople/index.ts
+++ b/src/screens/suggestedPeople/index.ts
@@ -1,2 +1,3 @@
export {default as SuggestedPeopleScreen} from './SuggestedPeopleScreen';
export {default as AnimatedTutorial} from './AnimatedTutorial';
+export {default as MutualBadgeHolders} from './MutualBadgeHolders';