diff options
author | Ivan Chen <ivan@tagg.id> | 2021-04-09 19:55:26 -0400 |
---|---|---|
committer | Ivan Chen <ivan@tagg.id> | 2021-04-09 19:55:26 -0400 |
commit | 0a480048b41a80e8569ce57064d1b9716c3d25e3 (patch) | |
tree | 4f1118560c10dcdfa32e99d2b73c3d7814d7904d /src/components/taggs/TaggsBar.tsx | |
parent | 17de7d8312b10f84af2178f769ff92bf96ab47f5 (diff) | |
parent | 9d5ad9bea36c0b2abffd04b25126d18158017137 (diff) |
Merge branch 'master' into tma784-style-message-input
# Conflicts:
# src/screens/chat/ChatListScreen.tsx
# src/screens/chat/ChatScreen.tsx
Diffstat (limited to 'src/components/taggs/TaggsBar.tsx')
-rw-r--r-- | src/components/taggs/TaggsBar.tsx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/components/taggs/TaggsBar.tsx b/src/components/taggs/TaggsBar.tsx index a5003fbb..4d567b25 100644 --- a/src/components/taggs/TaggsBar.tsx +++ b/src/components/taggs/TaggsBar.tsx @@ -7,7 +7,7 @@ import Animated, { useDerivedValue, } from 'react-native-reanimated'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; -import {useDispatch, useSelector, useStore} from 'react-redux'; +import {useDispatch, useSelector} from 'react-redux'; import { INTEGRATED_SOCIAL_LIST, PROFILE_CUTOUT_BOTTOM_Y, @@ -17,7 +17,6 @@ import {getLinkedSocials} from '../../services'; import {loadIndividualSocial, updateSocial} from '../../store/actions'; import {RootState} from '../../store/rootReducer'; import {ScreenType} from '../../types'; -import {canViewProfile} from '../../utils'; import Tagg from './Tagg'; const {View, ScrollView} = Animated; @@ -37,15 +36,12 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ linkedSocials, onLayout, }) => { + const dispatch = useDispatch(); let [taggs, setTaggs] = useState<Object[]>([]); let [taggsNeedUpdate, setTaggsNeedUpdate] = useState(true); const {user} = useSelector((state: RootState) => userXId ? state.userX[screenType][userXId] : state.user, ); - const state: RootState = useStore().getState(); - const allowTaggsNavigation = canViewProfile(state, userXId, screenType); - - const dispatch = useDispatch(); const insetTop = useSafeAreaInsets().top; /** * Updates the individual social that needs update @@ -80,13 +76,13 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ key={i} social={social} userXId={userXId} + screenType={screenType} user={user} isLinked={true} isIntegrated={INTEGRATED_SOCIAL_LIST.indexOf(social) !== -1} setTaggsNeedUpdate={setTaggsNeedUpdate} setSocialDataNeedUpdate={handleSocialUpdate} whiteRing={false} - allowNavigation={allowTaggsNavigation} />, ); i++; @@ -102,9 +98,9 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ setTaggsNeedUpdate={setTaggsNeedUpdate} setSocialDataNeedUpdate={handleSocialUpdate} userXId={userXId} + screenType={screenType} user={user} whiteRing={false} - allowNavigation={allowTaggsNavigation} />, ); i++; |