diff --git a/public/img/5481c365-3f7d-47af-bb0d-82fcbb064f92.png b/public/img/5481c365-3f7d-47af-bb0d-82fcbb064f92.png new file mode 100644 index 00000000..6e04e0ec Binary files /dev/null and b/public/img/5481c365-3f7d-47af-bb0d-82fcbb064f92.png differ diff --git a/src/app/dev/katalog/view/page.tsx b/src/app/dev/katalog/view/page.tsx index 62de781d..3a678f80 100644 --- a/src/app/dev/katalog/view/page.tsx +++ b/src/app/dev/katalog/view/page.tsx @@ -6,7 +6,7 @@ export default async function Page() { return ( <> {/* {JSON.stringify(data)} */} - + ); } diff --git a/src/app_modules/katalog/profile/edit/view.tsx b/src/app_modules/katalog/profile/edit/view.tsx index fcfce36f..7e92dbc8 100644 --- a/src/app_modules/katalog/profile/edit/view.tsx +++ b/src/app_modules/katalog/profile/edit/view.tsx @@ -14,18 +14,15 @@ import toast from "react-simple-toasts"; import { gs_profile } from "../state/global_state"; import { loadDataProfile } from "../fun/fun_get_profile"; -export default function EditProfile({data}: {data: any}) { +export default function EditProfile({ data }: { data: any }) { const router = useRouter(); //Get data profile - const [profile, setProfile] = useAtom(gs_profile); + const [profile, setProfile] = useState(data); useShallowEffect(() => { loadDataProfile(setProfile); }, []); - - - async function onUpdate() { const body = profile; if (_.values(body).includes("")) return toast("Lengkapi data"); diff --git a/src/app_modules/katalog/view/view.tsx b/src/app_modules/katalog/view/view.tsx index 826aa103..edb007ba 100644 --- a/src/app_modules/katalog/view/view.tsx +++ b/src/app_modules/katalog/view/view.tsx @@ -33,11 +33,11 @@ import { loadDataProfile } from "../profile/fun/fun_get_profile"; import { getFotoProfile } from "../profile/fun/get_foto_profile"; import { ApiHipmi } from "@/app/lib/api"; -export default function KatalogView() { +export default function KatalogView({data}: {data: any}) { const router = useRouter(); //Get data profile - const [profile, setProfile] = useAtom(gs_profile); + const [profile, setProfile] = useState(data) useShallowEffect(() => { loadDataProfile(setProfile); }, []);