From b6a31427f784c2e88ad6fe0178e5fd873b4a1099 Mon Sep 17 00:00:00 2001 From: Leon Jiang <35908040+leonyjiang@users.noreply.github.com> Date: Thu, 1 Apr 2021 23:58:02 -0400 Subject: Improve position of overlaid tutorial --- src/components/taggs/TaggsBar.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/components/taggs') 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 = ({ y, @@ -31,6 +32,7 @@ const TaggsBar: React.FC = ({ screenType, whiteRing, linkedSocials, + onLayout, }) => { let [taggs, setTaggs] = useState([]); let [taggsNeedUpdate, setTaggsNeedUpdate] = useState(true); @@ -138,7 +140,8 @@ const TaggsBar: React.FC = ({ whiteRing ? [styles.spContainer] : [styles.container, {shadowOpacity, paddingTop}] - }> + } + onLayout={onLayout}>