From 3bc14d052ba26bcd27d52bea40419da7bb2776b7 Mon Sep 17 00:00:00 2001 From: Infinite-Null Date: Sat, 20 Jan 2024 19:26:53 +0530 Subject: [PATCH] Fixed bugs --- Screens/HomePage.js | 2 +- Screens/ImageChat.js | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Screens/HomePage.js b/Screens/HomePage.js index 3da163a..abab89c 100644 --- a/Screens/HomePage.js +++ b/Screens/HomePage.js @@ -259,7 +259,7 @@ function EachCard({title, discreption, navigation, route, image, color, delay}) [...history, - {role:'model', parts:response} - ]) + try{ + const response = await GetImageResponse(images,val); + setchat((history)=>[...history, + {role:'model', parts:response} + ]) + }catch (e) { + + } setloading(false); } useEffect(() => { @@ -112,11 +116,20 @@ export default function ImageChat({navigation}) { { setVisible(true) + }} style={{ + backgroundColor:'rgb(42,82,176)', + height:40, + width:40, + alignItems:'center', + justifyContent:'center', + borderRadius:10, + elevation:10 }}>