forked from administration/panel
26 lines
996 B
TypeScript
26 lines
996 B
TypeScript
import Link from "next/link";
|
|
import { Report } from "revolt-api";
|
|
import { Card, CardDescription, CardHeader, CardTitle } from "../ui/card";
|
|
import { Badge } from "../ui/badge";
|
|
|
|
export function ReportCard({ report }: { report: Report }) {
|
|
return (
|
|
<Link href={`/panel/reports/${report._id}`}>
|
|
<Card className="transition-all hover:-translate-y-1 hover:shadow-md">
|
|
<CardHeader>
|
|
<CardTitle className="overflow-ellipsis whitespace-nowrap overflow-x-clip flex gap-2 items-center">
|
|
{report.content.report_reason.includes("Illegal") && (
|
|
<Badge variant="destructive">Urgent</Badge>
|
|
)}{" "}
|
|
{report.additional_context || "No reason specified"}
|
|
</CardTitle>
|
|
<CardDescription>
|
|
{report._id.toString().substring(20, 26)} ·{" "}
|
|
{report.content.report_reason} · {report.content.type}
|
|
</CardDescription>
|
|
</CardHeader>
|
|
</Card>
|
|
</Link>
|
|
);
|
|
}
|