diff options
author | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2021-04-01 23:58:02 -0400 |
---|---|---|
committer | Leon Jiang <35908040+leonyjiang@users.noreply.github.com> | 2021-04-01 23:58:02 -0400 |
commit | b6a31427f784c2e88ad6fe0178e5fd873b4a1099 (patch) | |
tree | 43ebd834bc4573c67914963af97d10d73f08f710 /src/components/taggs/TaggsBar.tsx | |
parent | f570f6c75ff051e9f8afe359a237a05828dc6ffb (diff) |
Improve position of overlaid tutorial
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} |