fix
Desc: - Perubahan pengambilan data dari API ke Function use server No issue
This commit is contained in:
8
src/app/dev/portofolio/create/[id]/layout.tsx
Normal file
8
src/app/dev/portofolio/create/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
||||
import { CreatePortofolio, CreatePortofolioLayout, PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
||||
return<>
|
||||
<CreatePortofolioLayout profileId={params.id}>{children}</CreatePortofolioLayout>
|
||||
</>
|
||||
}
|
||||
16
src/app/dev/portofolio/create/[id]/page.tsx
Normal file
16
src/app/dev/portofolio/create/[id]/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
|
||||
import { getBidangBisnis } from "@/app_modules/katalog/portofolio/fun/get_bidang_bisnis";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const bidangBisnis = await getBidangBisnis();
|
||||
|
||||
return (
|
||||
<>
|
||||
<CreatePortofolio
|
||||
bidangBisnis={bidangBisnis as any}
|
||||
profileId={params.id}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||
return<>
|
||||
<PortofolioLayout>{children}</PortofolioLayout>
|
||||
</>
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
|
||||
import { getBidangBisnis } from "@/app_modules/katalog/portofolio/fun/get_bidang_bisnis";
|
||||
import { getProfile } from "@/app_modules/katalog/profile";
|
||||
|
||||
export default async function Page() {
|
||||
const bidangBisnis = await getBidangBisnis()
|
||||
const id = await getProfile();
|
||||
const profileId = id?.id;
|
||||
// console.log(bidangBisnis)
|
||||
|
||||
return (
|
||||
<>
|
||||
<CreatePortofolio bidangBisnis={bidangBisnis as any} profileId={profileId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,13 @@
|
||||
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
||||
import { getOnePortofolio } from "@/app_modules/katalog/portofolio/fun/get_one_portofolio";
|
||||
|
||||
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||
const getPorto = await getOnePortofolio(params.id)
|
||||
|
||||
|
||||
export default async function Layout({ children }: { children: any }) {
|
||||
return (
|
||||
<>
|
||||
<PortofolioLayout>{children}</PortofolioLayout>
|
||||
<PortofolioLayout profileId={getPorto?.profileId}>{children}</PortofolioLayout>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user