aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShravya Ramesh <shravs1208@gmail.com>2021-03-29 18:18:00 -0700
committerShravya Ramesh <shravs1208@gmail.com>2021-03-29 18:18:00 -0700
commit976b6393d5d2be18e7b70447ef49f8d1b801b835 (patch)
treebb566ffcffd60d4d5424a4b717b20763ad84e8d3
parent93343c851eca208ca957ff30d115786c24f12737 (diff)
continued
-rw-r--r--src/assets/icons/invite-friends-prompt-icon.pngbin153479 -> 0 bytes
-rw-r--r--src/assets/icons/plus-logo.pngbin19640 -> 0 bytes
-rw-r--r--src/components/common/TaggPopup.tsx2
-rw-r--r--src/components/common/TaggPrompt.tsx12
-rw-r--r--src/components/notifications/NotificationPrompts.tsx15
-rw-r--r--src/screens/main/NotificationsScreen.tsx18
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
deleted file mode 100644
index b9422b9f..00000000
--- a/src/assets/icons/invite-friends-prompt-icon.png
+++ /dev/null
Binary files differ
diff --git a/src/assets/icons/plus-logo.png b/src/assets/icons/plus-logo.png
deleted file mode 100644
index 195f28fc..00000000
--- a/src/assets/icons/plus-logo.png
+++ /dev/null
Binary files 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<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} />
}