mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-23 13:42:01 +00:00
- Removed unnecessary border styles from various dashboard components including Devices, DeviceDetails, Parental Control, Payments, and Users pages to enhance visual consistency. - Updated DevicesTable to utilize a new ClickableRow component for better device interaction and management. - Refactored AddDevicesToCartButton to use a checkbox for selecting devices, improving user experience. - Enhanced DeviceCard component to streamline device information display and interaction. - Overall improvements to the layout and responsiveness of the dashboard components. These changes enhance the user interface and improve the maintainability of the codebase.
44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import { DevicesTable } from "@/components/devices-table";
|
|
import Search from "@/components/search";
|
|
import AddDeviceDialogForm from "@/components/user/add-device-dialog";
|
|
import { getCurrentUser } from "@/lib/auth-utils";
|
|
import React, { Suspense } from "react";
|
|
|
|
|
|
|
|
|
|
export default async function Devices({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<{
|
|
query: string;
|
|
page: number;
|
|
sortBy: string;
|
|
status: string;
|
|
}>;
|
|
}) {
|
|
const query = (await searchParams)?.query || "";
|
|
const user = await getCurrentUser()
|
|
return (
|
|
<div>
|
|
<div className="flex justify-between items-center text-gray-500 text-2xl font-bold title-bg py-4 px-2 mb-4">
|
|
<h3>
|
|
My Devices
|
|
</h3>
|
|
<AddDeviceDialogForm user_id={user?.id} />
|
|
</div>
|
|
|
|
<div
|
|
id="user-filters"
|
|
className=" pb-4 gap-4 flex sm:flex-row flex-col items-start justify-start"
|
|
>
|
|
<Search />
|
|
|
|
</div>
|
|
<Suspense key={query} fallback={"loading...."}>
|
|
<DevicesTable parentalControl={false} searchParams={searchParams} />
|
|
</Suspense>
|
|
</div>
|
|
);
|
|
}
|