aboutsummaryrefslogtreecommitdiff
path: root/src/components/onboarding/UpdateRequired.tsx
blob: 93e4e36d4f6178901969dd0264bcd3cb221b1eea (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
import React from 'react';
import {Image, Linking, Modal, StyleSheet, View} from 'react-native';
import {Text} from 'react-native-animatable';
import {CenteredView, TaggSquareButton} from '..';
import {normalize, SCREEN_WIDTH} from '../../utils';

interface UpdateRequiredProps {
  visible: boolean;
}

const UpdateRequired: React.FC<UpdateRequiredProps> = ({visible}) => {
  return (
    <Modal animationType={'slide'} transparent={true} visible={visible}>
      <CenteredView>
        <View style={styles.contentContainer}>
          <Image
            style={styles.logo}
            source={require('../../assets/images/logo-purple.png')}
          />
          <Text style={styles.header}>Update Required</Text>
          <Text style={styles.body}>
            You have to update your app to continue using Tagg, please download
            the latest version from the app store
          </Text>
          <TaggSquareButton
            title={'Update'}
            onPress={() => {
              Linking.openURL(
                'https://apps.apple.com/us/app/tagg-discover-your-community/id1537853613',
              );
            }}
            buttonStyle={'normal'}
            buttonColor={'purple'}
            labelColor={'white'}
            labelStyle={styles.button}
          />
        </View>
      </CenteredView>
    </Modal>
  );
};

const styles = StyleSheet.create({
  contentContainer: {
    marginTop: '20%',
    width: SCREEN_WIDTH * 0.9,
    backgroundColor: 'white',
    borderRadius: 5,
    padding: '10%',
    alignItems: 'center',
    shadowColor: '#000',
    shadowOffset: {
      width: 0,
      height: 2,
    },
    shadowOpacity: 0.25,
    shadowRadius: 3.84,
    elevation: 5,
  },
  logo: {
    width: normalize(60),
    height: normalize(60),
    marginBottom: '10%',
  },
  header: {
    fontSize: normalize(17),
    fontWeight: '700',
    lineHeight: 20,
    marginBottom: '5%',
  },
  body: {
    fontSize: normalize(13),
    color: 'grey',
    lineHeight: 20,
    textAlign: 'center',
    width: SCREEN_WIDTH * 0.8,
    marginBottom: '10%',
  },
  button: {
    fontWeight: '700',
  },
});

export default UpdateRequired;