title: auto

des: auto
note:auto
This commit is contained in:
2023-10-06 16:53:41 +08:00
parent 97cce652a8
commit 10a9cfe37d

View File

@@ -109,25 +109,25 @@ export default function HomeView() {
setProfile(data); setProfile(data);
} }
const [foto, setFoto] = useAtom(gs_fotoProfile); // const [foto, setFoto] = useAtom(gs_fotoProfile);
useShallowEffect(() => { // useShallowEffect(() => {
getFoto(profile?.imagesId); // getFoto(profile?.imagesId);
// if (profile?.imagesId === undefined) { // // if (profile?.imagesId === undefined) {
// return myConsole("Waiting data"); // // return myConsole("Waiting data");
// } else { // // } else {
// getFoto(profile?.imagesId); // // getFoto(profile?.imagesId);
// } // // }
}, [profile?.imagesId]); // }, [profile?.imagesId]);
async function getFoto(id: string) { // async function getFoto(id: string) {
if(id === undefined){ // if(id === undefined){
return myConsole("Waiting data") // return myConsole("Waiting data")
} else { // } 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(() => {
@@ -158,7 +158,7 @@ export default function HomeView() {
</ActionIcon> </ActionIcon>
<Text> <Text>
Welcome to I,{" "} Welcome to ,{" "}
{token?.username ? token?.username : <Loader size={"xs"} />} {token?.username ? token?.username : <Loader size={"xs"} />}
</Text> </Text>
</Flex> </Flex>