forked from administration/panel
feat: add pizza
parent
2ec9584bff
commit
6ac8f771f8
|
@ -2,6 +2,7 @@ import { ReportCard } from "@/components/cards/ReportCard";
|
||||||
import { CardLink } from "@/components/common/CardLink";
|
import { CardLink } from "@/components/common/CardLink";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { fetchOpenReports } from "@/lib/db";
|
import { fetchOpenReports } from "@/lib/db";
|
||||||
|
import { PizzaIcon } from "lucide-react";
|
||||||
|
|
||||||
export default async function Reports() {
|
export default async function Reports() {
|
||||||
const reports = (await fetchOpenReports())
|
const reports = (await fetchOpenReports())
|
||||||
|
@ -11,11 +12,21 @@ export default async function Reports() {
|
||||||
return (
|
return (
|
||||||
<div className="flex flex-col gap-2">
|
<div className="flex flex-col gap-2">
|
||||||
<Input placeholder="Search for reports..." disabled />
|
<Input placeholder="Search for reports..." disabled />
|
||||||
{reports.map((report) => (
|
{reports.length
|
||||||
|
? reports.map((report) => (
|
||||||
<CardLink key={report._id} href={`/panel/reports/${report._id}`}>
|
<CardLink key={report._id} href={`/panel/reports/${report._id}`}>
|
||||||
<ReportCard report={report} />
|
<ReportCard report={report} />
|
||||||
</CardLink>
|
</CardLink>
|
||||||
))}
|
))
|
||||||
|
: (<>
|
||||||
|
<h2 className="mt-8 flex justify-center">
|
||||||
|
<PizzaIcon className="text-gray-400" />
|
||||||
|
</h2>
|
||||||
|
<h3 className="text-xs text-center pb-2 text-gray-400">
|
||||||
|
You‘ve caught up for now.
|
||||||
|
</h3>
|
||||||
|
</>)
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue