"use client"; import PasswordForm from "@/components/form/settings/password"; import ProfileForm from "@/components/form/settings/profile"; import { close, loading } from "@/config/swal"; import { getDetailMasterUsers, getProfile } from "@/services/master-user"; import { Tab, Tabs } from "@heroui/react"; import Cookies from "js-cookie"; import { useEffect, useState } from "react"; export default function Settings() { const [profile, setProfile] = useState(); const uid = Cookies.get("uie"); useEffect(() => { if (!profile) { initFetch(); } }, [profile]); const initFetch = async () => { loading(); // const profile = await getDetailMasterUsers(String(uid)); const profile = await getProfile(); setProfile(profile?.data?.data); close(); }; return (
initFetch()} /> initFetch()} />
); }