aboutsummaryrefslogtreecommitdiff
path: root/src/screens/chat/NewChatModal.tsx
diff options
context:
space:
mode:
authorankit-thanekar007 <ankit.thanekar007@gmail.com>2021-04-09 11:14:46 -0700
committerankit-thanekar007 <ankit.thanekar007@gmail.com>2021-04-09 11:14:46 -0700
commitc8d5992ca659a1984194718703dd1b036e1fb59e (patch)
tree7bab7338e368b7445d4d51c667d36a956c404856 /src/screens/chat/NewChatModal.tsx
parentc54a25dc05eeb70780bc3a3ec05cb8cbed3f334b (diff)
Changes for default suggested
Diffstat (limited to 'src/screens/chat/NewChatModal.tsx')
-rw-r--r--src/screens/chat/NewChatModal.tsx9
1 files changed, 6 insertions, 3 deletions
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<NewChatModalProps> = ({
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<NewChatModalProps> = ({
const getQuerySuggested = async () => {
const searchResults = await loadSearchResults(
- `${SEARCH_ENDPOINT}?query=${query}&requestType='search'`,
+ `${SEARCH_ENDPOINT_MESSAGES}?query=${query}`,
);
if (query.length > 2) {
const sanitizedResult = [