diff options
Diffstat (limited to 'src/components/taggs/TaggsBar.tsx')
-rw-r--r-- | src/components/taggs/TaggsBar.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/components/taggs/TaggsBar.tsx b/src/components/taggs/TaggsBar.tsx index 567b58de..ec91b8e5 100644 --- a/src/components/taggs/TaggsBar.tsx +++ b/src/components/taggs/TaggsBar.tsx @@ -1,5 +1,5 @@ import React, {Fragment, useEffect, useState} from 'react'; -import {StyleSheet} from 'react-native'; +import {StyleSheet, LayoutChangeEvent} from 'react-native'; import Animated from 'react-native-reanimated'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; import {useDispatch, useSelector, useStore} from 'react-redux'; @@ -23,6 +23,7 @@ interface TaggsBarProps { screenType: ScreenType; whiteRing: boolean | undefined; linkedSocials?: string[]; + onLayout: (event: LayoutChangeEvent) => void; } const TaggsBar: React.FC<TaggsBarProps> = ({ y, @@ -31,6 +32,7 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ screenType, whiteRing, linkedSocials, + onLayout, }) => { let [taggs, setTaggs] = useState<Object[]>([]); let [taggsNeedUpdate, setTaggsNeedUpdate] = useState(true); @@ -138,7 +140,8 @@ const TaggsBar: React.FC<TaggsBarProps> = ({ whiteRing ? [styles.spContainer] : [styles.container, {shadowOpacity, paddingTop}] - }> + } + onLayout={onLayout}> <ScrollView horizontal showsHorizontalScrollIndicator={false} |