title: auto

des: auto
note:auto
This commit is contained in:
2023-10-06 16:50:13 +08:00
parent 5e1df67290
commit 9352626944

View File

@@ -111,18 +111,24 @@ export default function HomeView() {
const [foto, setFoto] = useAtom(gs_fotoProfile); const [foto, setFoto] = useAtom(gs_fotoProfile);
useShallowEffect(() => { 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]); }, [profile?.imagesId]);
async function getFoto(id: string) { async function getFoto(id: string) {
if(id === undefined){
return myConsole("Waiting data")
} else {
const data = await getFotoProfile(id); const data = await getFotoProfile(id);
setFoto(data); setFoto(data);
} }
}
// const [listPorto, setListPorto] = useAtom(gs_ListPortofolio); // const [listPorto, setListPorto] = useAtom(gs_ListPortofolio);
// useShallowEffect(() => { // useShallowEffect(() => {
// getListPorto(profile?.id); // getListPorto(profile?.id);