mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
feat(admin/problemset): add problem list table with Prisma query
This commit is contained in:
parent
ce41afa383
commit
653402614a
19
src/app/(app)/dashboard/@admin/problemset/page.tsx
Normal file
19
src/app/(app)/dashboard/@admin/problemset/page.tsx
Normal file
@ -0,0 +1,19 @@
|
||||
import prisma from "@/lib/prisma";
|
||||
import { ProblemsetTable } from "@/components/features/dashboard/admin/problemset/table";
|
||||
|
||||
export default async function AdminDashboardProblemsetPage() {
|
||||
const problems = await prisma.problem.findMany({
|
||||
select: {
|
||||
id: true,
|
||||
displayId: true,
|
||||
title: true,
|
||||
difficulty: true,
|
||||
},
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="h-full px-4">
|
||||
<ProblemsetTable data={problems} />
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Reference in New Issue
Block a user