fix
Desc: - Perubahan metode pengambilan data dari API ke use server
This commit is contained in:
4
src/app_modules/katalog/main/index.ts
Normal file
4
src/app_modules/katalog/main/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
import KatalogView from "./view";
|
||||
import KatalogLayout from "./layout";
|
||||
|
||||
export {KatalogView, KatalogLayout}
|
||||
41
src/app_modules/katalog/main/layout.tsx
Normal file
41
src/app_modules/katalog/main/layout.tsx
Normal file
@@ -0,0 +1,41 @@
|
||||
"use client";
|
||||
|
||||
import { Logout } from "@/app_modules/auth";
|
||||
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
||||
import { IconUserSearch, IconAward, IconQrcode, IconArrowLeft, IconPencilPlus } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
export default function KatalogLayout({ children }: { children: any }) {
|
||||
const router = useRouter()
|
||||
return (
|
||||
<>
|
||||
<AppShell
|
||||
header={
|
||||
<Header height={50} bg={"dark"}>
|
||||
<Group position="apart" align="center" h={50} p={"sm"}>
|
||||
<Group spacing={"sm"}>
|
||||
<ActionIcon variant="transparent" onClick={() => router.push("/dev/home")}>
|
||||
<IconArrowLeft/>
|
||||
</ActionIcon>
|
||||
{/* <ActionIcon>
|
||||
<IconAward />
|
||||
</ActionIcon> */}
|
||||
</Group>
|
||||
<Text color="white" fw={"bold"}>
|
||||
Katalog
|
||||
</Text>
|
||||
<Group spacing={"sm"}>
|
||||
<ActionIcon variant="transparent" onClick={() => router.push("/dev/portofolio/create")}>
|
||||
<IconPencilPlus />
|
||||
</ActionIcon>
|
||||
{/* <Logout /> */}
|
||||
</Group>
|
||||
</Group>
|
||||
</Header>
|
||||
}
|
||||
>
|
||||
{children}
|
||||
</AppShell>
|
||||
</>
|
||||
);
|
||||
}
|
||||
47
src/app_modules/katalog/main/view.tsx
Normal file
47
src/app_modules/katalog/main/view.tsx
Normal file
@@ -0,0 +1,47 @@
|
||||
"use client";
|
||||
|
||||
import { Warna } from "@/app/lib/warna";
|
||||
import {
|
||||
ActionIcon,
|
||||
BackgroundImage,
|
||||
Box,
|
||||
Center,
|
||||
Flex,
|
||||
Grid,
|
||||
Group,
|
||||
Image,
|
||||
Paper,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import {
|
||||
IconAddressBook,
|
||||
IconCamera,
|
||||
IconEditCircle,
|
||||
IconGenderFemale,
|
||||
IconGenderMale,
|
||||
IconHome,
|
||||
IconMail,
|
||||
} from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { ProfileView, getProfile } from "../profile";
|
||||
import { gs_profile } from "../profile/state/global_state";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { useAtom } from "jotai";
|
||||
import { loadDataProfile } from "../profile/fun/fun_get_profile";
|
||||
import { getFotoProfile } from "../profile/api/get-foto-profile";
|
||||
import { ApiHipmi } from "@/app/lib/api";
|
||||
import { ListPortofolioView } from "../portofolio";
|
||||
import { User } from "@prisma/client";
|
||||
import { USER_PROFILE } from "@/app_modules/models/user_profile";
|
||||
import { LIST_PORTOFOLIO } from "@/app_modules/models/portofolio";
|
||||
|
||||
export default function KatalogView({ user, listPorto }: { user: USER_PROFILE, listPorto: LIST_PORTOFOLIO }) {
|
||||
return (
|
||||
<>
|
||||
<ProfileView user={user} />
|
||||
<ListPortofolioView listPorto={listPorto} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user