From 9352626944973f8a8bb9094e5c9fffc43a79310f Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Fri, 6 Oct 2023 16:50:13 +0800 Subject: [PATCH] title: auto des: auto note:auto --- src/app_modules/home/view.tsx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/app_modules/home/view.tsx b/src/app_modules/home/view.tsx index f83ff552..dfd85463 100644 --- a/src/app_modules/home/view.tsx +++ b/src/app_modules/home/view.tsx @@ -111,16 +111,22 @@ export default function HomeView() { const [foto, setFoto] = useAtom(gs_fotoProfile); useShallowEffect(() => { - if (profile?.imagesId === undefined) { - return myConsole("Waiting data"); - } else { - getFoto(profile?.imagesId); - } + getFoto(profile?.imagesId); + // if (profile?.imagesId === undefined) { + // return myConsole("Waiting data"); + // } else { + // getFoto(profile?.imagesId); + // } }, [profile?.imagesId]); async function getFoto(id: string) { - const data = await getFotoProfile(id); - setFoto(data); + if(id === undefined){ + return myConsole("Waiting data") + } else { + const data = await getFotoProfile(id); + setFoto(data); + } + } // const [listPorto, setListPorto] = useAtom(gs_ListPortofolio);