Update index.tsx

This commit is contained in:
xmflsct 2023-07-14 22:56:08 +02:00
parent cdd80250d1
commit 0a99669af6
No known key found for this signature in database
GPG Key ID: 078A93AB607D85E0
1 changed files with 14 additions and 7 deletions

View File

@ -136,16 +136,23 @@ const Timeline: React.FC<Props> = ({
transform: [{ translateY: fetchedNoticeTop.value }] transform: [{ translateY: fetchedNoticeTop.value }]
})) }))
const refetchedNoticeAnimate = useAnimatedStyle(() => ({ const refetchedNoticeBottom = useDerivedValue(() => {
transform: [ if (firstLoad.value) {
{ return withSequence(
translateY: withSequence(
withTiming(0), withTiming(0),
withDelay( withDelay(
3000, 3000,
withTiming(fetchedNoticeHeight.value + 32, { easing: Easing.out(Easing.ease) }) withTiming(fetchedNoticeHeight.value + 32, { easing: Easing.out(Easing.ease) })
) )
) )
} else {
return fetchedNoticeHeight.value + 32
}
}, [])
const refetchedNoticeAnimate = useAnimatedStyle(() => ({
transform: [
{
translateY: refetchedNoticeBottom.value
} }
] ]
})) }))