diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/screens/moments/TagSelectionScreen.tsx | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/screens/moments/TagSelectionScreen.tsx b/src/screens/moments/TagSelectionScreen.tsx index ae11aa08..d68447f8 100644 --- a/src/screens/moments/TagSelectionScreen.tsx +++ b/src/screens/moments/TagSelectionScreen.tsx @@ -9,10 +9,10 @@ import { View, } from 'react-native'; import {FlatList} from 'react-native-gesture-handler'; -import {MainStackParams} from '../../routes'; import BackIcon from '../../assets/icons/back-arrow.svg'; import {SearchBar, TaggUserSelectionCell} from '../../components'; import {SEARCH_ENDPOINT_MESSAGES} from '../../constants'; +import {MainStackParams} from '../../routes'; import {loadSearchResults} from '../../services'; import {ProfilePreviewType} from '../../types'; import { @@ -41,7 +41,7 @@ const TagSelectionScreen: React.FC<TagSelectionScreenProps> = ({route}) => { const [label, setLabel] = useState<string>('Recent'); /* - * + * Add back button, Send selected users to CaptionScreen */ useEffect(() => { navigation.setOptions({ @@ -69,7 +69,8 @@ const TagSelectionScreen: React.FC<TagSelectionScreenProps> = ({route}) => { }); /* - * + * Load the initial list users from search/suggested endpoint + * that the loggedInUser might want to select */ const loadUsers = async () => { const data: ProfilePreviewType[] = await loadTaggUserSuggestions(); @@ -81,7 +82,7 @@ const TagSelectionScreen: React.FC<TagSelectionScreenProps> = ({route}) => { }; /* - * + * Load list of users based on search query */ const getQuerySuggested = async () => { if (query.length > 0) { @@ -95,14 +96,7 @@ const TagSelectionScreen: React.FC<TagSelectionScreenProps> = ({route}) => { }; /* - * - */ - useEffect(() => { - loadUsers(); - }, []); - - /* - * + * Make calls to appropriate functions to load user lists for selection */ useEffect(() => { if (query.length === 0) { |