import { EmptyPlaceholder } from "@/components/dashboard/empty-placeholder"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; // import { getTenantId } from "@/lib/auth"; // import { db } from "@/lib/db"; import { ChevronRight, Scan } from "lucide-react"; import Link from "next/link"; import { redirect } from "next/navigation"; import { CreateNewPermission } from "./create-new-permission"; export const revalidate = 0; export default async function RolesPage() { // const tenantId = getTenantId(); // const workspace = await db.query.workspaces.findFirst({ // where: (table, { and, eq, isNull }) => // and(eq(table.tenantId, tenantId), isNull(table.deletedAt)), // with: { // permissions: { // with: { // roles: { // with: { // role: true, // }, // }, // }, // }, // }, // }); // if (!workspace) { // return redirect("/new"); // } return (

Permissions

{/* {Intl.NumberFormat().format(workspace.permissions.length)} /{" "} */} {Intl.NumberFormat().format(Number.POSITIVE_INFINITY)} used{" "} Create New Permission} />
{true ? ( No permissions found Create your first permission Create New Permission} /> ) : ( )}
); }