Desc:
- Perubahan pengambilan data dari API ke Function use server
No issue
This commit is contained in:
2023-10-18 16:09:32 +08:00
parent 5f430786b4
commit 2a97165d1f
46 changed files with 398 additions and 345 deletions

View File

@@ -0,0 +1,12 @@
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
import { EditProfileLayout } from "@/app_modules/katalog/profile";
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
const data = await funGetUserProfile(params.id)
const profileId = data?.Profile?.id
return (
<>
<EditProfileLayout profileId={profileId}>{children}</EditProfileLayout>
</>
);
}

View File

@@ -0,0 +1,14 @@
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
import { getProfile } from "@/app_modules/katalog/profile";
import EditProfile from "@/app_modules/katalog/profile/edit/view";
export default async function Page({ params }: { params: { id: string } }) {
const data = await funGetUserProfile(params.id);
return (
<>
{/* {JSON.stringify(data)} */}
<EditProfile data={data as any} />
</>
);
}