aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/components/moments/MomentPost.tsx36
-rw-r--r--src/routes/main/MainStackScreen.tsx3
2 files changed, 37 insertions, 2 deletions
diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx
index 123ee5f4..ecd2e66f 100644
--- a/src/components/moments/MomentPost.tsx
+++ b/src/components/moments/MomentPost.tsx
@@ -34,6 +34,7 @@ import {RootState} from '../../store/rootReducer';
import {MomentPostType, MomentTagType, ScreenType, UserType} from '../../types';
import {
getTimePosted,
+ isIPhoneX,
navigateToProfile,
normalize,
SCREEN_HEIGHT,
@@ -133,7 +134,22 @@ const MomentPost: React.FC<MomentPostProps> = ({
useEffect(
() =>
navigation.setOptions({
- ...headerBarOptions('white', moment.moment_category),
+ ...headerBarOptions('white', ''),
+ headerTitle: () => (
+ <Text
+ numberOfLines={3}
+ style={[
+ styles.multilineHeaderTitle,
+ {
+ fontSize:
+ moment.moment_category.length > 18
+ ? normalize(14)
+ : normalize(16),
+ },
+ ]}>
+ {moment.moment_category}
+ </Text>
+ ),
}),
[moment.moment_id],
);
@@ -499,7 +515,23 @@ const styles = StyleSheet.create({
position: 'absolute',
top: -2.5,
},
- profilePreviewContainer: {paddingHorizontal: '3%'},
+ progressBaContainer: {
+ position: 'absolute',
+ top: isIPhoneX() ? 75 : 70,
+ },
+ profilePreviewContainer: {
+ paddingHorizontal: '3%',
+ },
+ multilineHeaderTitle: {
+ width: SCREEN_WIDTH * 0.7,
+ height: normalize(70),
+ marginTop: normalize(90) / 2,
+ textAlign: 'center',
+ lineHeight: normalize(21.48),
+ letterSpacing: normalize(1.3),
+ fontWeight: '700',
+ color: 'white',
+ },
});
export default MomentPost;
diff --git a/src/routes/main/MainStackScreen.tsx b/src/routes/main/MainStackScreen.tsx
index ccfc4cbd..35e1f8e0 100644
--- a/src/routes/main/MainStackScreen.tsx
+++ b/src/routes/main/MainStackScreen.tsx
@@ -382,6 +382,7 @@ export const headerBarOptions: (
),
headerTitle: () => (
<Text
+ numberOfLines={1}
style={[
styles.headerTitle,
{color: color},
@@ -417,7 +418,9 @@ const styles = StyleSheet.create({
shadowOffset: {width: 0, height: 0},
},
headerTitle: {
+ width: SCREEN_WIDTH * 0.7,
textAlign: 'center',
+ lineHeight: normalize(21.48),
letterSpacing: normalize(1.3),
fontWeight: '700',
},