Desc:
- Perubahan minor
This commit is contained in:
2023-10-05 11:41:02 +08:00
parent ab9fb81b38
commit 20016ff0c2
4 changed files with 5 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View File

@@ -6,7 +6,7 @@ export default async function Page() {
return (
<>
{/* {JSON.stringify(data)} */}
<KatalogView />
<KatalogView data={data} />
</>
);
}

View File

@@ -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");

View File

@@ -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);
}, []);