2024-11-30 23:38:32 +05:00
|
|
|
import { DevicesTable } from "@/components/devices-table";
|
|
|
|
import Search from "@/components/search";
|
|
|
|
import { Button } from "@/components/ui/button";
|
|
|
|
import React, { Suspense } from "react";
|
|
|
|
export default async function Devices({
|
|
|
|
searchParams,
|
|
|
|
}: {
|
|
|
|
searchParams: Promise<{
|
|
|
|
query: string;
|
|
|
|
page: number;
|
|
|
|
sortBy: string;
|
|
|
|
status: string;
|
|
|
|
}>;
|
|
|
|
}) {
|
2024-11-27 14:18:17 +05:00
|
|
|
|
|
|
|
return (
|
|
|
|
<div>
|
2024-11-30 23:38:32 +05:00
|
|
|
<div className="flex justify-between items-center border-b-2 text-gray-500 text-2xl font-bold title-bg py-4 px-2 mb-4">
|
|
|
|
<h3>
|
|
|
|
My Devices
|
|
|
|
</h3>
|
|
|
|
<Button>Add new device</Button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div
|
|
|
|
id="user-filters"
|
|
|
|
className=" border-b-2 pb-4 gap-4 flex items-center justify-start"
|
|
|
|
>
|
|
|
|
<Search />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<Suspense fallback={"loading...."}>
|
|
|
|
<DevicesTable searchParams={searchParams} />
|
|
|
|
</Suspense>
|
2024-11-27 14:18:17 +05:00
|
|
|
</div>
|
|
|
|
);
|
2024-11-24 23:30:44 +05:00
|
|
|
}
|