diff --git a/src/app_modules/home/view.tsx b/src/app_modules/home/view.tsx index 898b2c58..f83ff552 100644 --- a/src/app_modules/home/view.tsx +++ b/src/app_modules/home/view.tsx @@ -109,16 +109,20 @@ export default function HomeView() { setProfile(data); } - // const [foto, setFoto] = useAtom(gs_fotoProfile); - // useShallowEffect(() => { - // if (profile?.imagesId === undefined) { - // return myConsole("Waiting data"); - // } else { - // getFotoProfile(profile?.imagesId).then((v) => setFoto(v?.url)); - // } - // }, [profile?.imagesId]); + const [foto, setFoto] = useAtom(gs_fotoProfile); + useShallowEffect(() => { + 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); + } - // const [listPorto, setListPorto] = useAtom(gs_ListPortofolio); // useShallowEffect(() => { // getListPorto(profile?.id); @@ -148,7 +152,7 @@ export default function HomeView() { - Welcome to I ,{" "} + Welcome to ,{" "} {token?.username ? token?.username : }