diff options
Diffstat (limited to 'src/components/common')
-rw-r--r-- | src/components/common/TaggPrompt.tsx | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/components/common/TaggPrompt.tsx b/src/components/common/TaggPrompt.tsx index 20901e65..236501ff 100644 --- a/src/components/common/TaggPrompt.tsx +++ b/src/components/common/TaggPrompt.tsx @@ -3,11 +3,13 @@ import {StyleSheet, Text, TouchableOpacity} from 'react-native'; import {Image, View} from 'react-native-animatable'; import CloseIcon from '../../assets/ionicons/close-outline.svg'; import {normalize, SCREEN_HEIGHT} from '../../utils'; +import {useNavigation} from '@react-navigation/core'; type TaggPromptProps = { messageHeader: string; messageBody: string | Element; logoType: 'plus' | 'tagg' | 'invite_friends' | 'private_accounts' | 'chat'; + logoLink: string | null; hideCloseButton?: boolean; noPadding?: boolean; onClose: () => void; @@ -17,6 +19,7 @@ const TaggPrompt: React.FC<TaggPromptProps> = ({ messageHeader, messageBody, logoType, + logoLink, hideCloseButton, noPadding, onClose, @@ -44,9 +47,17 @@ const TaggPrompt: React.FC<TaggPromptProps> = ({ const topPadding = {paddingTop: noPadding ? 0 : SCREEN_HEIGHT / 10}; const bottomPadding = {paddingBottom: noPadding ? 0 : SCREEN_HEIGHT / 50}; + const navigation = useNavigation(); + return ( <View style={[styles.container, topPadding, bottomPadding]}> - <Image style={styles.icon} source={logo()} /> + {logoLink + ? + <TouchableOpacity + onPress={() => navigation.navigate(logoLink)}> + <Image style={styles.chat} source={logo()} /> + </TouchableOpacity> + : <Image style={styles.icon} source={logo()} />} <Text style={styles.header}>{messageHeader}</Text> <Text style={styles.subtext}>{messageBody}</Text> {!hideCloseButton && ( @@ -78,9 +89,10 @@ const styles = StyleSheet.create({ alignSelf: 'flex-end', }, icon: { - // Original, prior to chat notification - // width: normalize(40), - // height: normalize(40), + width: normalize(40), + height: normalize(40), + }, + chat: { width: normalize(350), height: normalize(70), }, |