fix
Desc: - Perubahan minor
This commit is contained in:
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 103 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 103 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 122 KiB |
@@ -34,7 +34,7 @@ import { getProfile } from "../katalog/profile";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useAtom } from "jotai";
|
||||
import { gs_token } from "./state/global_state";
|
||||
import { g_getProfile } from "../katalog/profile/fun/fun_get_profile";
|
||||
import { loadDataProfile } from "../katalog/profile/fun/fun_get_profile";
|
||||
import { gs_profile } from "../katalog/profile/state/global_state";
|
||||
|
||||
const listHalaman = [
|
||||
@@ -95,7 +95,7 @@ export default function HomeView() {
|
||||
|
||||
const [profile, setProfile] = useAtom(gs_profile);
|
||||
useShallowEffect(() => {
|
||||
g_getProfile(setProfile);
|
||||
loadDataProfile(setProfile);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
@@ -12,15 +12,15 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import toast from "react-simple-toasts";
|
||||
import { gs_profile } from "../state/global_state";
|
||||
import { g_getProfile } from "../fun/fun_get_profile";
|
||||
import { loadDataProfile } from "../fun/fun_get_profile";
|
||||
|
||||
export default function EditProfile() {
|
||||
export default function EditProfile({data}: {data: any}) {
|
||||
const router = useRouter();
|
||||
|
||||
//Get data profile
|
||||
const [profile, setProfile] = useAtom(gs_profile);
|
||||
useShallowEffect(() => {
|
||||
g_getProfile(setProfile);
|
||||
loadDataProfile(setProfile);
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { getProfile } from "..";
|
||||
* @param setProfile
|
||||
* @returns data profile
|
||||
*/
|
||||
export async function g_getProfile(setProfile: any) {
|
||||
export async function loadDataProfile(setProfile: any) {
|
||||
await getProfile()
|
||||
.then((res) => res)
|
||||
.then((val) => {
|
||||
|
||||
@@ -15,7 +15,7 @@ import { useAtom } from "jotai";
|
||||
import toast from "react-simple-toasts";
|
||||
import { gs_profile } from "../state/global_state";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { g_getProfile } from "../fun/fun_get_profile";
|
||||
import { loadDataProfile } from "../fun/fun_get_profile";
|
||||
import { funUploadFoto } from "../fun/upload_foto";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -27,7 +27,7 @@ export default function UploadFotoProfileLayout({
|
||||
const router = useRouter()
|
||||
const [profile, setProfile] = useAtom(gs_profile);
|
||||
useShallowEffect(() => {
|
||||
g_getProfile(setProfile);
|
||||
loadDataProfile(setProfile);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import { AspectRatio, FileButton, Image, Paper, Title } from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { useAtom } from "jotai";
|
||||
import { g_getProfile } from "../fun/fun_get_profile";
|
||||
import { loadDataProfile } from "../fun/fun_get_profile";
|
||||
import { gs_profile } from "../state/global_state";
|
||||
import { getFotoProfile } from "../fun/get_foto_profile";
|
||||
import { useState } from "react";
|
||||
@@ -13,7 +13,7 @@ import { myConsole } from "@/app/fun/my_console";
|
||||
export default function UploadFotoProfile() {
|
||||
const [profile, setProfile] = useAtom(gs_profile);
|
||||
useShallowEffect(() => {
|
||||
g_getProfile(setProfile);
|
||||
loadDataProfile(setProfile);
|
||||
}, []);
|
||||
|
||||
const [foto, setFoto] = useState<any | null>(null);
|
||||
|
||||
@@ -29,7 +29,7 @@ import { getProfile } from "../profile";
|
||||
import { gs_profile } from "../profile/state/global_state";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { useAtom } from "jotai";
|
||||
import { g_getProfile } from "../profile/fun/fun_get_profile";
|
||||
import { loadDataProfile } from "../profile/fun/fun_get_profile";
|
||||
import { getFotoProfile } from "../profile/fun/get_foto_profile";
|
||||
import { ApiHipmi } from "@/app/lib/api";
|
||||
|
||||
@@ -39,7 +39,7 @@ export default function KatalogView() {
|
||||
//Get data profile
|
||||
const [profile, setProfile] = useAtom(gs_profile);
|
||||
useShallowEffect(() => {
|
||||
g_getProfile(setProfile);
|
||||
loadDataProfile(setProfile);
|
||||
}, []);
|
||||
|
||||
const [foto, setFoto] = useState<any | null>(null);
|
||||
|
||||
Reference in New Issue
Block a user