From 658bf732e05c183d311b62a52be3729c942c9eb9 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Thu, 15 Apr 2021 16:54:01 -0400 Subject: moved update required to component/onboarding --- src/components/onboarding/UpdateRequired.tsx | 84 ++++++++++++++++++++++++++++ src/components/onboarding/index.ts | 1 + src/screens/onboarding/UpdateRequired.tsx | 84 ---------------------------- 3 files changed, 85 insertions(+), 84 deletions(-) create mode 100644 src/components/onboarding/UpdateRequired.tsx delete mode 100644 src/screens/onboarding/UpdateRequired.tsx (limited to 'src') diff --git a/src/components/onboarding/UpdateRequired.tsx b/src/components/onboarding/UpdateRequired.tsx new file mode 100644 index 00000000..93e4e36d --- /dev/null +++ b/src/components/onboarding/UpdateRequired.tsx @@ -0,0 +1,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 = ({visible}) => { + return ( + + + + + Update Required + + You have to update your app to continue using Tagg, please download + the latest version from the app store + + { + Linking.openURL( + 'https://apps.apple.com/us/app/tagg-discover-your-community/id1537853613', + ); + }} + buttonStyle={'normal'} + buttonColor={'purple'} + labelColor={'white'} + labelStyle={styles.button} + /> + + + + ); +}; + +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; diff --git a/src/components/onboarding/index.ts b/src/components/onboarding/index.ts index fdb85090..aad77f96 100644 --- a/src/components/onboarding/index.ts +++ b/src/components/onboarding/index.ts @@ -11,3 +11,4 @@ export {default as SocialMediaLinker} from './SocialMediaLinker'; export {default as LinkSocialMedia} from './LinkSocialMedia'; export {default as MomentCategory} from './MomentCategory'; export {default as UniversitySelection} from './UniversitySelection'; +export {default as UpdateRequired} from './UpdateRequired'; diff --git a/src/screens/onboarding/UpdateRequired.tsx b/src/screens/onboarding/UpdateRequired.tsx deleted file mode 100644 index adf7ba71..00000000 --- a/src/screens/onboarding/UpdateRequired.tsx +++ /dev/null @@ -1,84 +0,0 @@ -import React from 'react'; -import {Image, Linking, Modal, StyleSheet, View} from 'react-native'; -import {Text} from 'react-native-animatable'; -import {CenteredView, TaggSquareButton} from '../../components'; -import {normalize, SCREEN_WIDTH} from '../../utils'; - -interface UpdateRequiredProps { - visible: boolean; -} - -const UpdateRequired: React.FC = ({visible}) => { - return ( - - - - - Update Required - - You have to update your app to continue using Tagg, please download - the latest version from the app store - - { - Linking.openURL( - 'https://apps.apple.com/us/app/tagg-discover-your-community/id1537853613', - ); - }} - buttonStyle={'normal'} - buttonColor={'purple'} - labelColor={'white'} - labelStyle={styles.button} - /> - - - - ); -}; - -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; -- cgit v1.2.3-70-g09d2