Add public DS-2 welcome page on root for unauthenticated visitors
Second-brain scheme (logo + six cards with rays) reworked from the old platform's infographic. Root stays role-redirecting for signed-in users; middleware opens "/" as an exact match only. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+2
-1
@@ -1,12 +1,13 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { headers } from "next/headers";
|
||||
import { auth } from "@/lib/auth";
|
||||
import { WelcomePage } from "@/components/welcome/welcome-page";
|
||||
|
||||
export default async function HomePage() {
|
||||
const session = await auth.api.getSession({ headers: await headers() });
|
||||
|
||||
if (!session) {
|
||||
redirect("/login");
|
||||
return <WelcomePage />;
|
||||
}
|
||||
|
||||
const role = session.user.role;
|
||||
|
||||
Reference in New Issue
Block a user