diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-07-23 05:56:43 -0700 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-07-23 05:56:43 -0700 |
commit | 6fcfb36b37dd51d3e9d5baf025b896cc6f6045ee (patch) | |
tree | 72553c0ab22c2b9e4ec2f8acee2f03ed55443344 | |
parent | 174014ba40c603c188213391c7135df2f568e42b (diff) |
Remove lint warnings
-rw-r--r-- | src/components/moments/MomentPost.tsx | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/src/components/moments/MomentPost.tsx b/src/components/moments/MomentPost.tsx index 42caea34..2e5807f4 100644 --- a/src/components/moments/MomentPost.tsx +++ b/src/components/moments/MomentPost.tsx @@ -240,34 +240,15 @@ const MomentPost: React.FC<MomentPostProps> = ({ ); const ProgressBar = () => ( - <View - style={{ - position: 'absolute', - top: isIPhoneX() ? 75 : 70, - }}> + <View style={styles.progressBaContainer}> <SimpleGradientProgressbarView progress={videoProgress} - style={{ - position: 'absolute', - top: 0, - width: SCREEN_WIDTH, - height: 5, - }} + style={styles.progressBar} fromColor={TAGG_PURPLE} toColor={TAGG_LIGHT_BLUE_2} /> <View - style={{ - backgroundColor: '#fff', - width: 10, - height: 10, - borderRadius: 10, - borderWidth: 0.3, - borderColor: TAGG_PURPLE, - position: 'absolute', - top: -2.5, - left: videoProgress * SCREEN_WIDTH - 5, - }} + style={[styles.progressDot, {left: videoProgress * SCREEN_WIDTH - 5}]} /> </View> ); @@ -334,12 +315,12 @@ const MomentPost: React.FC<MomentPostProps> = ({ <View style={styles.bottomContainer} pointerEvents={'box-none'}> {isVideoPaused && ( <Animated.View - style={{ - opacity: fadeValue, - position: 'absolute', - left: '40%', - top: '50%', - }}> + style={[ + styles.pauseContainer, + { + opacity: fadeValue, + }, + ]}> <PauseIcon width={100} height={100} /> </Animated.View> )} @@ -494,6 +475,31 @@ const styles = StyleSheet.create({ width: SCREEN_WIDTH, height: SCREEN_HEIGHT, }, + pauseContainer: { + position: 'absolute', + left: '40%', + top: '50%', + }, + progressBar: { + position: 'absolute', + top: 0, + width: SCREEN_WIDTH, + height: 5, + }, + progressDot: { + backgroundColor: '#fff', + width: 10, + height: 10, + borderRadius: 10, + borderWidth: 0.3, + borderColor: TAGG_PURPLE, + position: 'absolute', + top: -2.5, + }, + progressBaContainer: { + position: 'absolute', + top: isIPhoneX() ? 75 : 70, + }, }); export default MomentPost; |