diff options
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++; |