From 84c103614247ab7dc8b86767f3bfa83c13f224aa Mon Sep 17 00:00:00 2001 From: ankit-thanekar007 Date: Thu, 8 Apr 2021 17:38:55 -0700 Subject: Modal viw added --- src/constants/api.ts | 3 ++- src/constants/strings.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/constants') diff --git a/src/constants/api.ts b/src/constants/api.ts index ffe47687..ef33631a 100644 --- a/src/constants/api.ts +++ b/src/constants/api.ts @@ -24,7 +24,8 @@ export const PROFILE_PHOTO_THUMBNAIL_ENDPOINT: string = export const GET_IG_POSTS_ENDPOINT: string = API_URL + 'posts-ig/'; export const GET_FB_POSTS_ENDPOINT: string = API_URL + 'posts-fb/'; export const GET_TWITTER_POSTS_ENDPOINT: string = API_URL + 'posts-twitter/'; -export const SEARCH_ENDPOINT: string = API_URL + 'search/v2/'; +export const SEARCH_ENDPOINT: string = API_URL + 'search/'; +export const SEARCH_ENDPOINT_V2: string = API_URL + 'search/v2/'; export const MOMENTS_ENDPOINT: string = API_URL + 'moments/'; export const MOMENT_THUMBNAIL_ENDPOINT: string = API_URL + 'moment-thumbnail/'; export const VERIFY_INVITATION_CODE_ENDPOUNT: string = API_URL + 'verify-code/'; diff --git a/src/constants/strings.ts b/src/constants/strings.ts index 4f792dcc..300ceb90 100644 --- a/src/constants/strings.ts +++ b/src/constants/strings.ts @@ -17,6 +17,7 @@ export const ERROR_DUP_OLD_PWD = 'You may not use a previously used password'; export const ERROR_EMAIL_IN_USE = 'Email already in use, please try another one'; export const ERROR_FAILED_LOGIN_INFO = 'Login failed, please try re-entering your login information'; export const ERROR_FAILED_TO_COMMENT = 'Unable to post comment, refresh and try again!'; +export const ERROR_FAILED_TO_CREATE_CHANNEL = 'Failed to create a channel, Please try again!'; export const ERROR_FAILED_TO_DELETE_COMMENT = 'Unable to delete comment, refresh and try again!'; export const ERROR_INVALID_INVITATION_CODE = 'Invitation code invalid, try again or talk to the friend that sent it 😬'; export const ERROR_INVALID_LOGIN = 'Invalid login, Please login again'; -- cgit v1.2.3-70-g09d2 From 593240c03984000c1e7ddc632d4a248267a62966 Mon Sep 17 00:00:00 2001 From: Ivan Chen Date: Fri, 9 Apr 2021 14:13:52 -0400 Subject: added two badges --- src/assets/badges/brown/iff.png | Bin 0 -> 8364 bytes src/assets/badges/brown/sailing.png | Bin 0 -> 17152 bytes src/constants/badges.ts | 10 ++++++++++ 3 files changed, 10 insertions(+) create mode 100644 src/assets/badges/brown/iff.png create mode 100644 src/assets/badges/brown/sailing.png (limited to 'src/constants') diff --git a/src/assets/badges/brown/iff.png b/src/assets/badges/brown/iff.png new file mode 100644 index 00000000..02f9a1c8 Binary files /dev/null and b/src/assets/badges/brown/iff.png differ diff --git a/src/assets/badges/brown/sailing.png b/src/assets/badges/brown/sailing.png new file mode 100644 index 00000000..1fde1c39 Binary files /dev/null and b/src/assets/badges/brown/sailing.png differ diff --git a/src/constants/badges.ts b/src/constants/badges.ts index b4cecefb..d7e9357b 100644 --- a/src/constants/badges.ts +++ b/src/constants/badges.ts @@ -23,10 +23,12 @@ export const _brownBadgeImages = { football: require('../assets/badges/brown/football.png'), gymnastics: require('../assets/badges/brown/gymnastics.png'), hockey: require('../assets/badges/brown/hockey.png'), + iff: require('../assets/badges/brown/iff.png'), impulse: require('../assets/badges/brown/impulse.png'), kappa_delta: require('../assets/badges/brown/kappa_delta.png'), lacrosse: require('../assets/badges/brown/lacrosse.png'), latin_at_brown: require('../assets/badges/brown/latin_at_brown.png'), + sailing: require('../assets/badges/brown/sailing.png'), soccer: require('../assets/badges/brown/soccer.png'), softball: require('../assets/badges/brown/softball.png'), tap: require('../assets/badges/brown/tap.png'), @@ -167,6 +169,10 @@ const _brownBadges = [ badgeName: 'Brown Baseball', badgeImage: _brownBadgeImages.baseball, }, + { + badgeName: 'Brown Sailing', + badgeImage: _brownBadgeImages.sailing, + }, ], }, @@ -266,6 +272,10 @@ const _brownBadges = [ badgeName: 'Impulse', badgeImage: _brownBadgeImages.impulse, }, + { + badgeName: 'Ivy Film Festival', + badgeImage: _brownBadgeImages.iff, + }, ], }, { -- cgit v1.2.3-70-g09d2 From c8d5992ca659a1984194718703dd1b036e1fb59e Mon Sep 17 00:00:00 2001 From: ankit-thanekar007 Date: Fri, 9 Apr 2021 11:14:46 -0700 Subject: Changes for default suggested --- src/constants/api.ts | 24 +++++++++++++++--------- src/screens/chat/NewChatModal.tsx | 9 ++++++--- src/screens/search/SearchScreen.tsx | 4 ++-- 3 files changed, 23 insertions(+), 14 deletions(-) (limited to 'src/constants') diff --git a/src/constants/api.ts b/src/constants/api.ts index ef33631a..43294386 100644 --- a/src/constants/api.ts +++ b/src/constants/api.ts @@ -2,7 +2,7 @@ // Dev const BASE_URL: string = 'http://127.0.0.1:8000/'; -export const STREAM_CHAT_API = 'g2hvnyqx9cmv' +export const STREAM_CHAT_API = 'g2hvnyqx9cmv'; // Prod // const BASE_URL: string = 'http://app-prod.tagg.id/'; @@ -25,7 +25,8 @@ export const GET_IG_POSTS_ENDPOINT: string = API_URL + 'posts-ig/'; export const GET_FB_POSTS_ENDPOINT: string = API_URL + 'posts-fb/'; export const GET_TWITTER_POSTS_ENDPOINT: string = API_URL + 'posts-twitter/'; export const SEARCH_ENDPOINT: string = API_URL + 'search/'; -export const SEARCH_ENDPOINT_V2: string = API_URL + 'search/v2/'; +export const SEARCH_ENDPOINT_MESSAGES: string = API_URL + 'search/messages/'; +export const SEARCH_ENDPOINT_SUGGESTED: string = API_URL + 'search/suggested/'; export const MOMENTS_ENDPOINT: string = API_URL + 'moments/'; export const MOMENT_THUMBNAIL_ENDPOINT: string = API_URL + 'moment-thumbnail/'; export const VERIFY_INVITATION_CODE_ENDPOUNT: string = API_URL + 'verify-code/'; @@ -38,20 +39,24 @@ export const PASSWORD_RESET_ENDPOINT: string = API_URL + 'password-reset/'; export const MOMENT_CATEGORY_ENDPOINT: string = API_URL + 'moment-category/'; export const NOTIFICATIONS_ENDPOINT: string = API_URL + 'notifications/'; export const DISCOVER_ENDPOINT: string = API_URL + 'discover/'; -export const SEARCH_BUTTONS_ENDPOPINT: string = DISCOVER_ENDPOINT + 'search_buttons/'; +export const SEARCH_BUTTONS_ENDPOPINT: string = + DISCOVER_ENDPOINT + 'search_buttons/'; export const WAITLIST_USER_ENDPOINT: string = API_URL + 'waitlist-user/'; export const COMMENT_THREAD_ENDPOINT: string = API_URL + 'reply/'; export const USERS_FROM_CONTACTS_ENDPOINT: string = API_URL + 'user_contacts/find_friends/'; export const INVITE_FRIEND_ENDPOINT: string = -API_URL + 'user_contacts/invite_friend/'; + API_URL + 'user_contacts/invite_friend/'; // Suggested People export const SP_USERS_ENDPOINT: string = API_URL + 'suggested_people/'; -export const SP_UPDATE_PICTURE_ENDPOINT: string = SP_USERS_ENDPOINT + 'update_picture/'; -export const SP_MUTUAL_BADGE_HOLDERS_ENDPOINT: string = SP_USERS_ENDPOINT + 'get_mutual_badge_holders/'; +export const SP_UPDATE_PICTURE_ENDPOINT: string = + SP_USERS_ENDPOINT + 'update_picture/'; +export const SP_MUTUAL_BADGE_HOLDERS_ENDPOINT: string = + SP_USERS_ENDPOINT + 'get_mutual_badge_holders/'; export const ADD_BADGES_ENDPOINT: string = SP_USERS_ENDPOINT + 'add_badges/'; -export const UPDATE_BADGES_ENDPOINT: string = SP_USERS_ENDPOINT + 'update_badges/'; +export const UPDATE_BADGES_ENDPOINT: string = + SP_USERS_ENDPOINT + 'update_badges/'; // Register as FCM device export const FCM_ENDPOINT: string = API_URL + 'fcm/'; @@ -72,6 +77,7 @@ export const LINK_IG_OAUTH: string = `https://www.instagram.com/oauth/authorize/ export const LINK_FB_OAUTH: string = `https://www.facebook.com/v8.0/dialog/oauth?client_id=1308555659343609&redirect_uri=${DEEPLINK}&scope=user_posts,public_profile&response_type=code`; export const LINK_TWITTER_OAUTH: string = API_URL + 'link-twitter-request/'; -// Profile Links -export const COMMUNITY_GUIDELINES: string = 'https://www.tagg.id/community-guidelines'; +// Profile Links +export const COMMUNITY_GUIDELINES: string = + 'https://www.tagg.id/community-guidelines'; export const PRIVACY_POLICY: string = 'https://www.tagg.id/privacy-policy'; diff --git a/src/screens/chat/NewChatModal.tsx b/src/screens/chat/NewChatModal.tsx index a7754d3a..95e46ecd 100644 --- a/src/screens/chat/NewChatModal.tsx +++ b/src/screens/chat/NewChatModal.tsx @@ -9,7 +9,10 @@ import { } from 'react-native'; import {useSharedValue} from 'react-native-reanimated'; import {BottomDrawer} from '../../components'; -import {SEARCH_ENDPOINT} from '../../constants'; +import { + SEARCH_ENDPOINT_MESSAGES, + SEARCH_ENDPOINT_SUGGESTED, +} from '../../constants'; import {loadSearchResults} from '../../services'; import {ScreenType} from '../../types'; import {normalize} from '../../utils'; @@ -42,7 +45,7 @@ const NewChatModal: React.FC = ({ const getDefaultSuggested = async () => { const searchResults = await loadSearchResults( - `${SEARCH_ENDPOINT}?query=&requestType=suggested`, + `${SEARCH_ENDPOINT_SUGGESTED}`, ); console.log(searchResults); const sanitizedResult = [ @@ -57,7 +60,7 @@ const NewChatModal: React.FC = ({ const getQuerySuggested = async () => { const searchResults = await loadSearchResults( - `${SEARCH_ENDPOINT}?query=${query}&requestType='search'`, + `${SEARCH_ENDPOINT_MESSAGES}?query=${query}`, ); if (query.length > 2) { const sanitizedResult = [ diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx index 6d8e4848..f7e1c467 100644 --- a/src/screens/search/SearchScreen.tsx +++ b/src/screens/search/SearchScreen.tsx @@ -24,7 +24,7 @@ import { SearchResultsBackground, TabsGradient, } from '../../components'; -import {SEARCH_ENDPOINT_V2} from '../../constants'; +import {SEARCH_ENDPOINT} from '../../constants'; import {loadSearchResults} from '../../services'; import {resetScreenType} from '../../store/actions'; import {RootState} from '../../store/rootReducer'; @@ -71,7 +71,7 @@ const SearchScreen: React.FC = () => { } (async () => { const searchResults = await loadSearchResults( - `${SEARCH_ENDPOINT_V2}?query=${query}`, + `${SEARCH_ENDPOINT}?query=${query}`, ); if (query.length > 2) { const sanitizedResult = [ -- cgit v1.2.3-70-g09d2