Deskripsi:
- Di beranda diganti menggunakan API
- Skeleton beranda
- V 1.2.25
This commit is contained in:
2024-12-12 14:46:06 +08:00
parent 80b6d35fe9
commit d1f7966123
15 changed files with 253 additions and 168 deletions

View File

@@ -0,0 +1,16 @@
import { job_getAllListPublish } from "@/app_modules/job/fun/get/get_all_publish";
import _ from "lodash";
import { NextResponse } from "next/server";
export async function GET(params: Request) {
const { searchParams } = new URL(params.url);
const page = searchParams.get("page");
const search = searchParams.get("search");
const data = await job_getAllListPublish({
page: _.toNumber(page),
search: search as string,
});
return NextResponse.json({ data });
}

View File

@@ -1,12 +1,9 @@
import { Job_ViewBeranda } from "@/app_modules/job";
import { job_getAllListPublish } from "@/app_modules/job/fun/get/get_all_publish";
export default async function Page() {
const listJob = await job_getAllListPublish({ page: 1 });
return (
<>
<Job_ViewBeranda listJob={listJob as any} />
<Job_ViewBeranda />
</>
);
}

View File

@@ -0,0 +1,4 @@
export const API_RouteJob = {
get_all: ({ page, search }: { page: number; search?: string }) =>
`/api/job/get-all?page=${page}&search=${search || ""}`,
};

View File

@@ -23,4 +23,6 @@ process.on('SIGINT', async () => {
process.exit(0);
});
// console.log('==> Test prisma');
export default prisma;