import { EmptyPlaceholder } from "@/components/dashboard/empty-placeholder";
import { Code } from "@/components/ui/code";
// import { getTenantId } from "@/lib/auth";
// import { db, eq, schema } from "@/lib/db";
// import { stripeEnv } from "@/lib/env";
import { currentUser } from "@clerk/nextjs";
import { ArrowLeft } from "lucide-react";
import Link from "next/link";
import { redirect } from "next/navigation";
import Stripe from "stripe";
type Props = {
searchParams: {
session_id: string;
};
};
export default async function StripeSuccess(props: Props) {
// const tenantId = getTenantId();
// if (!tenantId) {
// return redirect("/auth/sign-in");
// }
// const _user = await currentUser();
// const ws = await db.query.workspaces.findFirst({
// where: (table, { and, eq, isNull }) =>
// and(eq(table.tenantId, tenantId), isNull(table.deletedAt)),
// });
// if (!ws) {
// return redirect("/new");
// }
// const e = stripeEnv();
// if (!e) {
// return (
// {props.searchParams.session_id} you are trying to access
// does not exist. Please contact support@unkey.dev.
// {session.customer as string} you are trying to access
// does not exist. Please contact support@unkey.dev.
//