diff options
author | Shravya Ramesh <shravs1208@gmail.com> | 2021-05-20 15:24:32 -0700 |
---|---|---|
committer | Shravya Ramesh <shravs1208@gmail.com> | 2021-05-20 17:58:17 -0700 |
commit | 342e3dcb835dc1cb3e757187c9578334d5865ed6 (patch) | |
tree | 0b5397f4ab24de6c30a5cab0edba5ae5a16e35fe /src | |
parent | ab0336395d39ab5300e84fbccd9c347b04a08ecf (diff) |
Add comments for tag selection screen
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) { |