From 976b6393d5d2be18e7b70447ef49f8d1b801b835 Mon Sep 17 00:00:00 2001 From: Shravya Ramesh Date: Mon, 29 Mar 2021 18:18:00 -0700 Subject: continued --- src/assets/icons/invite-friends-prompt-icon.png | Bin 153479 -> 0 bytes src/assets/icons/plus-logo.png | Bin 19640 -> 0 bytes src/components/common/TaggPopup.tsx | 2 +- src/components/common/TaggPrompt.tsx | 12 +++++++----- src/components/notifications/NotificationPrompts.tsx | 15 +++++++++++++++ src/screens/main/NotificationsScreen.tsx | 18 +++++------------- 6 files changed, 28 insertions(+), 19 deletions(-) delete mode 100644 src/assets/icons/invite-friends-prompt-icon.png delete mode 100644 src/assets/icons/plus-logo.png (limited to 'src') diff --git a/src/assets/icons/invite-friends-prompt-icon.png b/src/assets/icons/invite-friends-prompt-icon.png deleted file mode 100644 index b9422b9f..00000000 Binary files a/src/assets/icons/invite-friends-prompt-icon.png and /dev/null differ diff --git a/src/assets/icons/plus-logo.png b/src/assets/icons/plus-logo.png deleted file mode 100644 index 195f28fc..00000000 Binary files a/src/assets/icons/plus-logo.png and /dev/null differ 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 = ({route, navigation}) => { {messageHeader} 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 = ({ 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 ( + {}} + /> + ); +}; + 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={} + ListHeaderComponent={} refreshControl={ } -- cgit v1.2.3-70-g09d2