mirror of
https://github.com/i701/sarlink-portal.git
synced 2025-02-23 10:22:01 +00:00
- Added a new `bun.lockb` file for dependency management. - Updated `next.config.ts` to set output to "standalone" for better deployment options. - Removed `package-lock.json` to streamline package management. - Modified `package.json` to update dependencies, including `@prisma/client` and `sonner`, and adjusted build scripts for improved functionality. - Enhanced Tailwind CSS configuration to include new animations and color schemes. - Refactored various dashboard components to improve UI consistency, including adding a new `My Wallet` page and updating existing pages to use a unified styling approach. - Introduced a new `BlockDeviceDialog` component for managing device blocking with user-defined reasons. - Improved logging and error handling in payment verification and device management functions. These changes enhance the overall functionality, maintainability, and user experience of the application.
44 lines
1.1 KiB
TypeScript
44 lines
1.1 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 border-[1px] rounded-md border-dashed font-bold title-bg py-4 px-2 mb-4">
|
|
<h3 className="text-sarLinkOrange text-2xl">
|
|
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>
|
|
);
|
|
}
|