diff options
| author | Ivan Chen <ivan@thetaggid.com> | 2021-01-27 19:32:21 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-27 19:32:21 -0500 |
| commit | 19d2a861f260c02031d951f3d43bff8ac672146d (patch) | |
| tree | 253abceb267dfb75ac9118995886ff152c1ba74b /src/screens | |
| parent | 60d3d97ad6913369762877a9dbfdaac0473deb28 (diff) | |
| parent | dc9556867dd44b706c43678d40802a335ff40658 (diff) | |
Merge pull request #203 from IvanIFChen/tma577-profile-slowness
[TMA-577] Profile Slowness
Diffstat (limited to 'src/screens')
| -rw-r--r-- | src/screens/profile/IndividualMoment.tsx | 2 | ||||
| -rw-r--r-- | src/screens/search/SearchScreen.tsx | 10 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/screens/profile/IndividualMoment.tsx b/src/screens/profile/IndividualMoment.tsx index 6b82b31c..ea0c8fb6 100644 --- a/src/screens/profile/IndividualMoment.tsx +++ b/src/screens/profile/IndividualMoment.tsx @@ -70,7 +70,7 @@ const IndividualMoment: React.FC<IndividualMomentProps> = ({ style={styles.postContent} momentId={item.moment_id} caption={item.caption} - pathHash={item.path_hash} + pathHash={item.moment_url} dateTime={item.date_created} screenType={screenType} /> diff --git a/src/screens/search/SearchScreen.tsx b/src/screens/search/SearchScreen.tsx index 059bd968..f0be7c9e 100644 --- a/src/screens/search/SearchScreen.tsx +++ b/src/screens/search/SearchScreen.tsx @@ -2,7 +2,6 @@ import AsyncStorage from '@react-native-community/async-storage'; import {useFocusEffect} from '@react-navigation/native'; import React, {useCallback, useEffect, useState} from 'react'; import { - Dimensions, Keyboard, RefreshControl, ScrollView, @@ -37,9 +36,7 @@ const NO_USER: UserType = { */ const SearchScreen: React.FC = () => { - const {recentSearches, explores} = useSelector( - (state: RootState) => state.taggUsers, - ); + const {recentSearches} = useSelector((state: RootState) => state.taggUsers); const [query, setQuery] = useState<string>(''); const [results, setResults] = useState<Array<ProfilePreviewType>>([]); const [recents, setRecents] = useState<Array<ProfilePreviewType>>( @@ -47,7 +44,6 @@ const SearchScreen: React.FC = () => { ); const [searching, setSearching] = useState(false); const top = Animated.useValue(-SCREEN_HEIGHT); - const [user, setUser] = useState<UserType>(NO_USER); const [refreshing, setRefreshing] = useState<boolean>(false); const dispatch = useDispatch(); @@ -70,10 +66,6 @@ const SearchScreen: React.FC = () => { const loadResults = async (q: string) => { try { const token = await AsyncStorage.getItem('token'); - if (!token) { - setUser(NO_USER); - return; - } const response = await fetch(`${SEARCH_ENDPOINT}?query=${q}`, { method: 'GET', headers: { |
