import { CopyButton } from "@/components/dashboard/copy-button"; import { CreateKeyButton } from "@/components/dashboard/create-key-button"; import { Navbar } from "@/components/dashboard/navbar"; import { PageHeader } from "@/components/dashboard/page-header"; import { Badge } from "@/components/ui/badge"; import { getTenantId } from "@/lib/auth"; // import { db } from "@/lib/db"; import { notFound } from "next/navigation"; import { Keys } from "./keys"; export const dynamic = "force-dynamic"; export const runtime = "edge"; export default async function ApiPage(props: { params: { apiId: string; keyAuthId: string } }) { const tenantId = getTenantId(); // const keyAuth = await db.query.keyAuth.findFirst({ // where: (table, { eq, and, isNull }) => // and(eq(table.id, props.params.keyAuthId), isNull(table.deletedAt)), // with: { // workspace: true, // api: true, // }, // }); // if (!keyAuth || keyAuth.workspace.tenantId !== tenantId) { // return notFound(); // } const keyAuth = { id: "fsdfsdfsdf", api: { id: "fsdfsdfsdf", name: "asdasdas" } } const navigation = [ { label: "Overview", href: `/app/keys/${keyAuth.id}`, segment: null, }, { label: "API", href: `/app/apis/${keyAuth.api.id}`, segment: "settings", }, ]; return ( <> {keyAuth.id} , , ]} />
); }