import { authOptions } from "@/app/auth"; import { DevicesTable } from "@/components/devices-table"; import Search from "@/components/search"; import AddDeviceDialogForm from "@/components/user/add-device-dialog"; import { getServerSession } from "next-auth"; 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 session = await getServerSession(authOptions); return (