Merge pull request #310 from bipproduction/bagas/13-feb-25
fix api forum
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { LayoutForum_Main } from "@/app_modules/forum";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -9,13 +8,11 @@ export default async function Layout({
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const dataAuthor = await user_getOneByUserId(userLoginId as string);
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutForum_Main dataAuthor={dataAuthor as any}>
|
||||
{children}
|
||||
</LayoutForum_Main>
|
||||
<LayoutForum_Main userLoginId={userLoginId}>{children}</LayoutForum_Main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { Forum_Beranda } from "@/app_modules/forum";
|
||||
import { forum_new_getAllPosting } from "@/app_modules/forum/fun/get/new_get_all_posting";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const listForum = await forum_new_getAllPosting({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Forum_Beranda
|
||||
listForum={listForum as any}
|
||||
userLoginId={userLoginId as string}
|
||||
/>
|
||||
<Forum_Beranda userLoginId={userLoginId as string} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
import { Portofolio_EditLogoBisnis } from "@/app_modules/katalog/portofolio";
|
||||
import { portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/get_one_portofolio";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Page() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Portofolio_EditLogoBisnis />
|
||||
<Portofolio_EditLogoBisnis />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,15 +2,15 @@ import { Portofolio_EditMedsosBisnis } from "@/app_modules/katalog/portofolio";
|
||||
import { Portofolio_geOnetMedsosById } from "@/app_modules/katalog/portofolio/fun/get/get_one_medsos_by_id";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let portoId = params.id;
|
||||
const dataMedsos = await Portofolio_geOnetMedsosById(portoId).then((res) =>
|
||||
_.omit(res, ["active", "createdAt", "updatedAt", "portofolioId"])
|
||||
);
|
||||
export default async function Page() {
|
||||
// let portoId = params.id;
|
||||
// const dataMedsos = await Portofolio_geOnetMedsosById(portoId).then((res) =>
|
||||
// _.omit(res, ["active", "createdAt", "updatedAt", "portofolioId"])
|
||||
// );
|
||||
|
||||
return (
|
||||
<>
|
||||
<Portofolio_EditMedsosBisnis dataMedsos={dataMedsos as any} />
|
||||
<Portofolio_EditMedsosBisnis />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user