diff options
-rw-r--r-- | src/assets/icons/invite-friends-prompt-icon.png | bin | 153479 -> 0 bytes | |||
-rw-r--r-- | src/assets/icons/plus-logo.png | bin | 19640 -> 0 bytes | |||
-rw-r--r-- | src/components/common/TaggPopup.tsx | 2 | ||||
-rw-r--r-- | src/components/common/TaggPrompt.tsx | 12 | ||||
-rw-r--r-- | src/components/notifications/NotificationPrompts.tsx | 15 | ||||
-rw-r--r-- | src/screens/main/NotificationsScreen.tsx | 18 |
6 files changed, 28 insertions, 19 deletions
diff --git a/src/assets/icons/invite-friends-prompt-icon.png b/src/assets/icons/invite-friends-prompt-icon.png Binary files differdeleted file mode 100644 index b9422b9f..00000000 --- a/src/assets/icons/invite-friends-prompt-icon.png +++ /dev/null diff --git a/src/assets/icons/plus-logo.png b/src/assets/icons/plus-logo.png Binary files differdeleted file mode 100644 index 195f28fc..00000000 --- a/src/assets/icons/plus-logo.png +++ /dev/null diff --git a/src/components/common/TaggPopup.tsx b/src/components/common/TaggPopup.tsx index 8b6865fd..f9929580 100644 --- a/src/components/common/TaggPopup.tsx +++ b/src/components/common/TaggPopup.tsx @@ -41,7 +41,7 @@ const TaggPopup: React.FC<TaggPopupProps> = ({route, navigation}) => { <View style={styles.popup}> <Image style={styles.icon} - source={require('../../assets/icons/plus-logo.png')} + source={require('../../assets/icons/notificationPrompts/plus-logo.png')} /> <View style={styles.textContainer}> <Text style={styles.header}>{messageHeader}</Text> diff --git a/src/components/common/TaggPrompt.tsx b/src/components/common/TaggPrompt.tsx index 6169b3f1..721b1eb8 100644 --- a/src/components/common/TaggPrompt.tsx +++ b/src/components/common/TaggPrompt.tsx @@ -2,12 +2,12 @@ import * as React from 'react'; 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 {isIPhoneX, normalize, SCREEN_HEIGHT} from '../../utils'; type TaggPromptProps = { messageHeader: string; messageBody: string | Element; - logoType: 'plus' | 'tagg' | 'invite_friends'; + logoType: 'plus' | 'tagg' | 'invite_friends' | 'private_accounts'; hideCloseButton?: boolean; noPadding?: boolean; onClose: () => void; @@ -28,9 +28,11 @@ const TaggPrompt: React.FC<TaggPromptProps> = ({ const logo = () => { switch (logoType) { case 'plus': - return require('../../assets/icons/plus-logo.png'); + return require('../../assets/icons/notificationPrompts/plus-logo.png'); case 'invite_friends': - return require('../../assets/icons/invite-friends-prompt-icon.png'); + return require('../../assets/icons/notificationPrompts/invite-friends-prompt-icon.png'); + case 'private_accounts': + return require('../../assets/icons/notificationPrompts/private-accounts-prompt-icon.png'); case 'tagg': default: return require('../../assets/images/logo-purple.png'); @@ -66,7 +68,7 @@ const styles = StyleSheet.create({ justifyContent: 'center', alignItems: 'center', backgroundColor: 'white', - height: SCREEN_HEIGHT / 4, + height: isIPhoneX() ? SCREEN_HEIGHT / 6 : SCREEN_HEIGHT / 5, }, closeButton: { position: 'relative', diff --git a/src/components/notifications/NotificationPrompts.tsx b/src/components/notifications/NotificationPrompts.tsx index dc27925b..386b45e6 100644 --- a/src/components/notifications/NotificationPrompts.tsx +++ b/src/components/notifications/NotificationPrompts.tsx @@ -17,6 +17,21 @@ export const InviteFriendsPrompt: React.FC = () => { ); }; +export const PrivateAccountsPrompt: React.FC = () => { + return ( + <TaggPrompt + messageHeader={'Private or Public!'} + messageBody={ + 'You can now choose to make your account private!\nHead over to the privacy tab in settings to check it out' + } + logoType={'private_accounts'} + hideCloseButton={true} + noPadding={true} + onClose={() => {}} + /> + ); +}; + interface SPPromptNotificationProps { showSPNotifyPopUp: boolean; } diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx index 68437f2b..4697704c 100644 --- a/src/screens/main/NotificationsScreen.tsx +++ b/src/screens/main/NotificationsScreen.tsx @@ -1,13 +1,7 @@ import AsyncStorage from '@react-native-community/async-storage'; import {useFocusEffect} from '@react-navigation/native'; import moment from 'moment'; -import React, { - Fragment, - ReactElement, - useCallback, - useEffect, - useState, -} from 'react'; +import React, {useCallback, useEffect, useState} from 'react'; import { Image, RefreshControl, @@ -20,11 +14,9 @@ import { import {TouchableOpacity} from 'react-native-gesture-handler'; import {SafeAreaView} from 'react-native-safe-area-context'; import {useDispatch, useSelector} from 'react-redux'; -import {TabsGradient, TaggPrompt} from '../../components'; -import { - InviteFriendsPrompt, - Notification, -} from '../../components/notifications'; +import {PrivateAccountsPrompt} from '../../components/notifications/NotificationPrompts'; +import {TabsGradient} from '../../components'; +import {Notification} from '../../components/notifications'; import { loadUserNotifications, updateNewNotificationReceived, @@ -270,7 +262,7 @@ const NotificationsScreen: React.FC = () => { renderItem={renderNotification} renderSectionHeader={renderSectionHeader} renderSectionFooter={renderSectionFooter} - ListHeaderComponent={<InviteFriendsPrompt />} + ListHeaderComponent={<PrivateAccountsPrompt />} refreshControl={ <RefreshControl refreshing={refreshing} onRefresh={onRefresh} /> } |