Skip to content

Commit be5394c

Browse files
committed
loop with setTimeout
1 parent 0dee7ec commit be5394c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/screens/aesop/PassportOnboardingScreen.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,16 @@ const PassportOnboardingScreen: React.FC<
3838
<LottieView
3939
ref={animationRef}
4040
autoPlay={false}
41-
loop={true}
41+
loop={false}
4242
source={passportOnboardingAnimation}
4343
style={styles.animation}
4444
cacheComposition={true}
4545
renderMode="HARDWARE"
46+
onAnimationFinish={() => {
47+
setTimeout(() => {
48+
animationRef.current?.play();
49+
}, 100);
50+
}}
4651
/>
4752
</ExpandableBottomLayout.TopSection>
4853
<ExpandableBottomLayout.BottomSection

0 commit comments

Comments
 (0)