Penalty Übersicht für Nutzer und Penalty-Log
This commit is contained in:
30
apps/hub/app/(app)/admin/penalty/[id]/page.tsx
Normal file
30
apps/hub/app/(app)/admin/penalty/[id]/page.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
import { ExclamationTriangleIcon } from "@radix-ui/react-icons";
|
||||
import { prisma } from "@repo/db";
|
||||
import { Error } from "_components/Error";
|
||||
|
||||
export default async function Page({ params }: { params: Promise<{ id: string }> }) {
|
||||
const { id } = await params;
|
||||
|
||||
const penalty = await prisma.penalty.findUnique({
|
||||
where: {
|
||||
id: Number(id),
|
||||
},
|
||||
include: {
|
||||
User: true,
|
||||
CreatedUser: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!penalty) return <Error statusCode={404} title="User not found" />;
|
||||
|
||||
return (
|
||||
<div className="grid grid-cols-6 gap-4">
|
||||
<div className="col-span-full">
|
||||
<p className="text-2xl font-semibold text-left flex items-center gap-2">
|
||||
<ExclamationTriangleIcon className="w-5 h-5" />
|
||||
Strafe #{penalty.id}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user