Skip to content

Commit 80e515b

Browse files
committed
lottie animation main screen
1 parent 2a2637a commit 80e515b

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

app/(tabs)/index.tsx

+15-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ export default function Home() {
9696
/>
9797
</View>
9898
)}
99-
{recipe && (
99+
100+
{recipe ? (
100101
<ScrollView
101102
showsVerticalScrollIndicator={false}
102103
contentContainerStyle={{ paddingBottom: 200 }}>
@@ -109,6 +110,19 @@ export default function Home() {
109110
/>
110111
<Text className="p-4 text-lg text-white">{recipe}</Text>
111112
</ScrollView>
113+
) : (
114+
<View className="flex-1 items-center p-6">
115+
<LottieView
116+
loop
117+
autoPlay
118+
ref={animation}
119+
source={require('../../assets/animations/recipe.json')}
120+
style={{ width: 400, height: 400 }}
121+
/>
122+
<Text className="text-center text-2xl font-semibold text-white">
123+
Let's start with your ingredients for the best recipe!
124+
</Text>
125+
</View>
112126
)}
113127
</LinearGradient>
114128
</View>

0 commit comments

Comments
 (0)