Update Switch.tsx

This commit is contained in:
Zhiyuan Zheng 2022-02-23 00:08:06 +01:00
parent 0a35aff8ef
commit bece2a37fd
1 changed files with 5 additions and 2 deletions

View File

@ -57,8 +57,11 @@ const TabMeSwitch: React.FC = () => {
const scrollViewRef = useRef<ScrollView>(null)
useEffect(() => {
scrollViewRef.current?.scrollToEnd({ animated: true })
}, [])
setTimeout(
() => scrollViewRef.current?.scrollToEnd({ animated: true }),
150
)
}, [scrollViewRef.current])
return (
<KeyboardAvoidingView