aboutsummaryrefslogtreecommitdiff
path: root/src/screens/profile/MomentUploadPromptScreen.tsx
blob: 7e04063c808b0256dc819ba8bdd7e3c16db89359 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
import * as React from 'react';
import {RouteProp} from '@react-navigation/native';
import {StackNavigationProp} from '@react-navigation/stack';
import {MainStackParams} from '../../routes';
import CloseIcon from '../../assets/ionicons/close-outline.svg';
import {StyleSheet, Text, View} from 'react-native';
import {Moment} from '../../components';
import {Image} from 'react-native-animatable';
import {UPLOAD_MOMENT_PROMPT_ONE_MESSAGE} from '../../constants/strings';
import {PROFILE_CUTOUT_BOTTOM_Y} from '../../constants';
import {normalize} from '../../utils';

type MomentUploadPromptScreenRouteProp = RouteProp<
  MainStackParams,
  'MomentUploadPrompt'
>;
type MomentUploadPromptScreenNavigationProp = StackNavigationProp<
  MainStackParams,
  'MomentUploadPrompt'
>;

interface MomentUploadPromptScreenProps {
  route: MomentUploadPromptScreenRouteProp;
  navigation: MomentUploadPromptScreenNavigationProp;
}

const MomentUploadPromptScreen: React.FC<MomentUploadPromptScreenProps> = ({
  route,
  navigation,
}) => {
  const {screenType, momentCategory, profileBodyHeight, socialsBarHeight} =
    route.params;
  return (
    <View style={styles.container}>
      <CloseIcon
        color={'white'}
        style={styles.closeButton}
        onPress={() => {
          navigation.goBack();
        }}
      />

      <Text style={styles.text}>{UPLOAD_MOMENT_PROMPT_ONE_MESSAGE}</Text>
      <Image
        source={require('../../assets/gifs/dotted-arrow-white.gif')}
        style={[
          StyleSheet.absoluteFill,
          styles.arrowGif,
          {top: profileBodyHeight + PROFILE_CUTOUT_BOTTOM_Y},
        ]}
      />
      <Moment
        key={1}
        title={momentCategory}
        images={[]}
        userXId={undefined}
        screenType={screenType}
        handleMomentCategoryDelete={() => {}}
        shouldAllowDeletion={false}
        showDownButton={false}
        showUpButton={false}
        externalStyles={{
          container: {
            ...styles.momentContainer,
            top: PROFILE_CUTOUT_BOTTOM_Y + profileBodyHeight + socialsBarHeight,
          },
          titleText: styles.momentHeaderText,
          header: styles.momentHeader,
          scrollContainer: styles.momentScrollContainer,
        }}
      />
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    flexDirection: 'column',
  },
  closeButton: {
    ...StyleSheet.absoluteFillObject,
    top: 45,
    left: 20,
    width: 40,
    height: 40,
  },
  text: {
    marginTop: 250,
    color: '#fff',
    fontWeight: 'bold',
    fontSize: normalize(20),
    textAlign: 'center',
  },
  arrowGif: {
    width: 200,
    height: 150,
    left: 120,
    transform: [{rotate: '350deg'}, {rotateY: '180deg'}],
  },

  //Styles to adjust moment container
  momentScrollContainer: {
    backgroundColor: 'transparent',
    marginTop: 10,
  },
  momentContainer: {
    ...StyleSheet.absoluteFillObject,
    backgroundColor: 'transparent',
    height: 175,
  },
  momentHeaderText: {
    ...StyleSheet.absoluteFillObject,
    marginLeft: 12,
    paddingVertical: 5,
  },
  momentHeader: {
    marginTop: 7,
    backgroundColor: 'transparent',
  },
});

export default MomentUploadPromptScreen;