You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { Suspense } from "react";
|
|
import { PlusIcon } from "lucide-react";
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
import { CariMaster } from "@/app/(dashboard)/master/_components/cari-master";
|
|
import { DaftarRak } from "./_components/daftar-rak";
|
|
import { RakForm } from "./_components/rak-form";
|
|
|
|
export default function RakPage({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<{ search?: string; page?: string }>;
|
|
}) {
|
|
return (
|
|
<div className="p-4">
|
|
<div className="flex items-center justify-between">
|
|
<h1 className="text-lg font-semibold">Data Rak</h1>
|
|
<div className="flex items-center gap-2">
|
|
<Suspense fallback={null}>
|
|
<CariMaster basePath="/master/rak" placeholder="Cari rak..." />
|
|
</Suspense>
|
|
<RakForm
|
|
trigger={
|
|
<Button>
|
|
Tambah
|
|
<PlusIcon />
|
|
</Button>
|
|
}
|
|
/>
|
|
</div>
|
|
</div>
|
|
<Suspense fallback={<p className="mt-4 text-sm">Memuat...</p>}>
|
|
<DaftarRak searchParams={searchParams} />
|
|
</Suspense>
|
|
</div>
|
|
);
|
|
}
|