aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components/moments/MomentPost.tsx62
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;