#style: UI Katalog

Desc:
- Tampilan UI katalog selesai diubah
## No Issuee
This commit is contained in:
2024-07-10 10:11:43 +08:00
parent 9068631c33
commit 5f620c030b
29 changed files with 722 additions and 416 deletions

View File

@@ -1,10 +1,29 @@
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
import { KatalogLayout } from "@/app_modules/katalog/main";
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
export default async function Layout({
children,
params,
}: {
children: any;
params: { id: string };
}) {
const profileId = params.id;
const dataProfile = await Profile_getOneProfileAndUserById(profileId)
const authorId = dataProfile?.userId;
const userLoginId = await user_getOneUserId();
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
// const a = atob(params.id.toString())
return (
<>
<KatalogLayout profileId={params.id}>{children}</KatalogLayout>
<KatalogLayout
profileId={profileId}
userLoginId={userLoginId}
authorId={authorId as any}
>
{children}
</KatalogLayout>
</>
);
}

View File

@@ -1,9 +0,0 @@
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
export default async function Page() {
return (
<>
<ComponentGlobal_V2_LoadingPage />
</>
);
}

View File

@@ -1,37 +1,21 @@
import prisma from "@/app/lib/prisma";
import { KatalogView } from "@/app_modules/katalog/main";
import { url } from "inspector";
import { unsealData } from "iron-session";
import _ from "lodash";
import { cookies } from "next/headers";
import { redirect } from "next/navigation";
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
import yaml from "yaml";
import fs from "fs";
import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/get_list_portofolio";
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile";
import { Katalog_MainView } from "@/app_modules/katalog";
import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/get_list_portofolio";
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
export default async function Page({ params }: { params: { id: string } }) {
let profileId = params.id;
const authorId = await user_getOneUserId();
const dataUser = await user_getOneByUserId(authorId)
const userLoginId = await user_getOneUserId();
const listPorto = await funGetListPortofolio(profileId);
const dataProfile = await Profile_getOneProfileAndUserById(profileId);
// await new Promise((a, b) => {
// setTimeout(a, 1000);
// });
return (
<>
<KatalogView
<Katalog_MainView
profile={dataProfile as any}
listPorto={listPorto as any}
userLoginId={authorId}
userLoginId={userLoginId}
/>
</>
);