20 lines
499 B
TypeScript
20 lines
499 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { supabaseServer } from "@/lib/supabase-server";
|
|
import { AuthForm } from "./auth-form";
|
|
|
|
export default async function HomePage() {
|
|
const supabase = supabaseServer();
|
|
const { data } = await supabase.auth.getUser();
|
|
if (data.user) {
|
|
redirect("/notes");
|
|
}
|
|
|
|
return (
|
|
<main>
|
|
<h1>nextjs-scribase-starter</h1>
|
|
<p>Auth, Postgres and a welcome email, backed by one Scribase project.</p>
|
|
<AuthForm />
|
|
</main>
|
|
);
|
|
}
|