From 719d39cabf96c8e2ac259a37f4bc2f8efd713595 Mon Sep 17 00:00:00 2001 From: Bagasbanuna02 Date: Fri, 6 Oct 2023 15:30:38 +0800 Subject: [PATCH] title: auto des: auto note:auto --- src/app_modules/home/view.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/app_modules/home/view.tsx b/src/app_modules/home/view.tsx index 28870b81..f5af21ce 100644 --- a/src/app_modules/home/view.tsx +++ b/src/app_modules/home/view.tsx @@ -97,10 +97,16 @@ export default function HomeView() { setToken(data); } - // const [profile, setProfile] = useAtom(gs_profile); - // useShallowEffect(() => { - // loadDataProfile(setProfile); - // }, []); + const [profile, setProfile] = useAtom(gs_profile); + useShallowEffect(() => { + // loadDataProfile(setProfile); + loadProfile() + }, []); + async function loadProfile() { + const data = await getProfile() + setProfile(data) + + } // const [foto, setFoto] = useAtom(gs_fotoProfile); // useShallowEffect(() => {