aboutsummaryrefslogtreecommitdiff
path: root/src/screens
diff options
context:
space:
mode:
Diffstat (limited to 'src/screens')
-rw-r--r--src/screens/chat/NewChatModal.tsx9
-rw-r--r--src/screens/search/SearchScreen.tsx4
2 files changed, 8 insertions, 5 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 = [
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 = [