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 }]
}))
const refetchedNoticeBottom = useDerivedValue(() => {
if (firstLoad.value) {
return withSequence(
withTiming(0),
withDelay(
3000,
withTiming(fetchedNoticeHeight.value + 32, { easing: Easing.out(Easing.ease) })
)
)
} else {
return fetchedNoticeHeight.value + 32
}
}, [])
const refetchedNoticeAnimate = useAnimatedStyle(() => ({
transform: [
{
translateY: withSequence(
withTiming(0),
withDelay(
3000,
withTiming(fetchedNoticeHeight.value + 32, { easing: Easing.out(Easing.ease) })
)
)
translateY: refetchedNoticeBottom.value
}
]
}))