diff options
Diffstat (limited to 'src/components/taggs')
| -rw-r--r-- | src/components/taggs/TaggsBar.tsx | 14 | 
1 files changed, 8 insertions, 6 deletions
diff --git a/src/components/taggs/TaggsBar.tsx b/src/components/taggs/TaggsBar.tsx index 87dabc3d..a5003fbb 100644 --- a/src/components/taggs/TaggsBar.tsx +++ b/src/components/taggs/TaggsBar.tsx @@ -1,16 +1,17 @@  import React, {useEffect, useState} from 'react'; -import {StyleSheet} from 'react-native'; +import {LayoutChangeEvent, StyleSheet} from 'react-native';  import Animated, { -  useDerivedValue, -  interpolate,    Extrapolate, +  interpolate,    useAnimatedStyle, +  useDerivedValue,  } from 'react-native-reanimated'; +import {useSafeAreaInsets} from 'react-native-safe-area-context';  import {useDispatch, useSelector, useStore} from 'react-redux';  import {    INTEGRATED_SOCIAL_LIST, -  SOCIAL_LIST,    PROFILE_CUTOUT_BOTTOM_Y, +  SOCIAL_LIST,  } from '../../constants';  import {getLinkedSocials} from '../../services';  import {loadIndividualSocial, updateSocial} from '../../store/actions'; @@ -18,7 +19,6 @@ import {RootState} from '../../store/rootReducer';  import {ScreenType} from '../../types';  import {canViewProfile} from '../../utils';  import Tagg from './Tagg'; -import {useSafeAreaInsets} from 'react-native-safe-area-context';  const {View, ScrollView} = Animated;  interface TaggsBarProps { @@ -27,6 +27,7 @@ interface TaggsBarProps {    userXId: string | undefined;    screenType: ScreenType;    linkedSocials?: string[]; +  onLayout: (event: LayoutChangeEvent) => void;  }  const TaggsBar: React.FC<TaggsBarProps> = ({    y, @@ -34,6 +35,7 @@ const TaggsBar: React.FC<TaggsBarProps> = ({    userXId,    screenType,    linkedSocials, +  onLayout,  }) => {    let [taggs, setTaggs] = useState<Object[]>([]);    let [taggsNeedUpdate, setTaggsNeedUpdate] = useState(true); @@ -140,7 +142,7 @@ const TaggsBar: React.FC<TaggsBarProps> = ({    }));    return taggs.length > 0 ? ( -    <View style={[styles.container, animatedStyles]}> +    <View style={[styles.container, animatedStyles]} onLayout={onLayout}>        <ScrollView          horizontal          showsHorizontalScrollIndicator={false}  | 
