fix
Desc: - Perubahan minor
This commit is contained in:
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user