Add create team page
This commit is contained in:
@@ -1,33 +1,16 @@
|
||||
import Link from "next/link";
|
||||
|
||||
import { getServerAuthSession } from "~/server/auth";
|
||||
import { Button } from "@unsend/ui/src/button";
|
||||
import { SendHorizonal } from "lucide-react";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function Home() {
|
||||
const session = await getServerAuthSession();
|
||||
|
||||
return (
|
||||
<main className="h-screen">
|
||||
<h1 className="text-center text-4xl mt-20 flex gap-4 justify-center items-center">
|
||||
<SendHorizonal />
|
||||
Send emails in minutes. Completely open source
|
||||
</h1>
|
||||
<div className="flex justify-center mt-10">
|
||||
{session?.user ? (
|
||||
<Button className="mx-auto">
|
||||
<Link href="/dashboard" className="mx-auto">
|
||||
Send email
|
||||
</Link>
|
||||
</Button>
|
||||
) : (
|
||||
<Button className="mx-auto">
|
||||
<Link href="api/auth/signin" className="mx-auto">
|
||||
Signin
|
||||
</Link>
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</main>
|
||||
);
|
||||
if (!session?.user) {
|
||||
redirect("/login");
|
||||
}
|
||||
|
||||
if (!session.user.isBetaUser) {
|
||||
redirect("/wait-list");
|
||||
} else {
|
||||
redirect("/dashboard");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user