aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Chen <ivan@tagg.id>2021-06-07 16:11:09 -0400
committerIvan Chen <ivan@tagg.id>2021-06-08 16:18:34 -0400
commit960b1516bc06c1fa16ba47a4aab62c94c3b10beb (patch)
treed3ffe333316a16134929c5c77d9c57e111ec43bb
parentd71a4d178715d34570d949e0cd0c1c58186715fc (diff)
Cleanup code
-rw-r--r--src/screens/profile/IndividualMoment.tsx42
1 files changed, 11 insertions, 31 deletions
diff --git a/src/screens/profile/IndividualMoment.tsx b/src/screens/profile/IndividualMoment.tsx
index f8015720..95428c39 100644
--- a/src/screens/profile/IndividualMoment.tsx
+++ b/src/screens/profile/IndividualMoment.tsx
@@ -2,18 +2,13 @@ import {BlurView} from '@react-native-community/blur';
import {RouteProp} from '@react-navigation/native';
import {StackNavigationProp} from '@react-navigation/stack';
import React from 'react';
-import {FlatList, StyleSheet, View} from 'react-native';
+import {FlatList, StyleSheet} from 'react-native';
import {useSelector} from 'react-redux';
import {IndividualMomentTitleBar, MomentPost} from '../../components';
import {MainStackParams} from '../../routes';
import {RootState} from '../../store/rootreducer';
import {MomentType} from '../../types';
-import {
- normalize,
- SCREEN_HEIGHT,
- SCREEN_WIDTH,
- StatusBarHeight,
-} from '../../utils';
+import {normalize, StatusBarHeight} from '../../utils';
/**
* Individual moment view opened when user clicks on a moment tile
@@ -55,41 +50,26 @@ const IndividualMoment: React.FC<IndividualMomentProps> = ({
close={() => navigation.pop()}
title={moment_category}
/>
- <View style={styles.content}>
- <FlatList
- data={momentData}
- renderItem={({item}: {item: MomentType}) => (
- <MomentPost userXId={userXId} screenType={screenType} item={item} />
- )}
- keyExtractor={(_, index) => index.toString()}
- showsVerticalScrollIndicator={false}
- initialScrollIndex={initialIndex}
- />
- </View>
+ <FlatList
+ data={momentData}
+ renderItem={({item}: {item: MomentType}) => (
+ <MomentPost userXId={userXId} screenType={screenType} item={item} />
+ )}
+ keyExtractor={(_, index) => index.toString()}
+ showsVerticalScrollIndicator={false}
+ initialScrollIndex={initialIndex}
+ />
</BlurView>
);
};
const styles = StyleSheet.create({
contentContainer: {
- width: SCREEN_WIDTH,
- height: SCREEN_HEIGHT,
paddingTop: StatusBarHeight,
flex: 1,
- paddingBottom: 0,
- },
- content: {
- flex: 9,
},
header: {
height: normalize(70),
},
- postContainer: {
- flex: 1,
- },
- postHeader: {
- flex: 1,
- },
- postContent: {flex: 9},
});
export default IndividualMoment;