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 (
{p.name}
{p.description}