aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/main/NotificationsScreen.tsx36
-rw-r--r--src/screens/onboarding/OnboardingStepTwo.tsx34
-rw-r--r--src/screens/profile/InviteFriendsScreen.tsx14
3 files changed, 31 insertions, 53 deletions
diff --git a/src/screens/main/NotificationsScreen.tsx b/src/screens/main/NotificationsScreen.tsx
index 57dea6f5..68437f2b 100644
--- a/src/screens/main/NotificationsScreen.tsx
+++ b/src/screens/main/NotificationsScreen.tsx
@@ -21,7 +21,10 @@ 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 {Notification} from '../../components/notifications';
+import {
+ InviteFriendsPrompt,
+ Notification,
+} from '../../components/notifications';
import {
loadUserNotifications,
updateNewNotificationReceived,
@@ -252,30 +255,6 @@ const NotificationsScreen: React.FC = () => {
return null;
};
- const SPPromptNotification: ReactElement = showSPNotifyPopUp ? (
- <TaggPrompt
- messageHeader={'New Suggested People Page!'}
- messageBody={
- <>
- <Text>
- A new page where you can discover new profiles. Just press the new{' '}
- </Text>
- <Image
- style={styles.icon}
- source={require('../../assets/navigationIcons/home.png')}
- />
- <Text> button on the tab bar to check it out!</Text>
- </>
- }
- logoType={'tagg'}
- hideCloseButton={true}
- noPadding={true}
- onClose={() => {}}
- />
- ) : (
- <Fragment />
- );
-
return (
<View style={styles.background}>
<SafeAreaView>
@@ -291,7 +270,7 @@ const NotificationsScreen: React.FC = () => {
renderItem={renderNotification}
renderSectionHeader={renderSectionHeader}
renderSectionFooter={renderSectionFooter}
- ListHeaderComponent={SPPromptNotification}
+ ListHeaderComponent={<InviteFriendsPrompt />}
refreshControl={
<RefreshControl refreshing={refreshing} onRefresh={onRefresh} />
}
@@ -359,11 +338,6 @@ const styles = StyleSheet.create({
flex: 1,
justifyContent: 'center',
},
- icon: {
- width: 20,
- height: 20,
- tintColor: 'grey',
- },
});
export default NotificationsScreen;
diff --git a/src/screens/onboarding/OnboardingStepTwo.tsx b/src/screens/onboarding/OnboardingStepTwo.tsx
index 1014981d..e79e1886 100644
--- a/src/screens/onboarding/OnboardingStepTwo.tsx
+++ b/src/screens/onboarding/OnboardingStepTwo.tsx
@@ -245,23 +245,6 @@ const OnboardingStepTwo: React.FC<OnboardingStepTwoProps> = ({
<Text style={styles.formHeader}>SIGN UP</Text>
</View>
<TaggInput
- accessibilityHint="Enter your email."
- accessibilityLabel="Email input field."
- placeholder="School Email"
- autoCompleteType="email"
- textContentType="emailAddress"
- autoCapitalize="none"
- returnKeyType="next"
- keyboardType="email-address"
- onChangeText={handleEmailUpdate}
- blurOnSubmit={false}
- ref={emailRef}
- valid={form.isValidEmail}
- invalidWarning={'Please enter a valid email address.'}
- attemptedSubmit={form.attemptedSubmit}
- width={280}
- />
- <TaggInput
accessibilityHint="Enter a username."
accessibilityLabel="Username input field."
placeholder="Username"
@@ -281,6 +264,23 @@ const OnboardingStepTwo: React.FC<OnboardingStepTwoProps> = ({
width={280}
/>
<TaggInput
+ accessibilityHint="Enter your email."
+ accessibilityLabel="Email input field."
+ placeholder="School Email"
+ autoCompleteType="email"
+ textContentType="emailAddress"
+ autoCapitalize="none"
+ returnKeyType="next"
+ keyboardType="email-address"
+ onChangeText={handleEmailUpdate}
+ blurOnSubmit={false}
+ ref={emailRef}
+ valid={form.isValidEmail}
+ invalidWarning={'Please enter a valid email address.'}
+ attemptedSubmit={form.attemptedSubmit}
+ width={280}
+ />
+ <TaggInput
accessibilityHint="Enter a password."
accessibilityLabel="Password input field."
placeholder="Password"
diff --git a/src/screens/profile/InviteFriendsScreen.tsx b/src/screens/profile/InviteFriendsScreen.tsx
index dcf6ccfc..4af52349 100644
--- a/src/screens/profile/InviteFriendsScreen.tsx
+++ b/src/screens/profile/InviteFriendsScreen.tsx
@@ -91,14 +91,18 @@ const InviteFriendsScreen: React.FC<InviteFriendsScreenProps> = ({route}) => {
if (query.length > 0) {
const searchResultsUsers = usersFromContacts.filter(
(item: ProfilePreviewType) =>
- item.first_name.toLowerCase().includes(query) ||
- item.last_name.toLowerCase().includes(query) ||
- item.username.toLowerCase().includes(query),
+ (item.first_name + ' ' + item.last_name)
+ .toLowerCase()
+ .startsWith(query) ||
+ item.username.toLowerCase().startsWith(query) ||
+ item.last_name.toLowerCase().startsWith(query),
);
const searchResultsNonUsers = nonUsersFromContacts.filter(
(item) =>
- item.firstName.toLowerCase().includes(query) ||
- item.lastName.toLowerCase().includes(query),
+ (item.firstName + ' ' + item.lastName)
+ .toLowerCase()
+ .startsWith(query) ||
+ item.lastName.toLowerCase().startsWith(query),
);
const sanitizedResult = {
usersFromContacts: searchResultsUsers,