blob: d6e3a41b6f6ccb4c913d3b563e6aada409291567 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import { redirect } from "next/navigation";
import { auth } from "@/lib/auth";
import SignOut from "@/app/components/sign-out";
import Guilds from "@/app/components/Guilds";
export default async function Home() {
const session = await auth();
if (!session) redirect("/");
return (
<div>
<nav className="bg-gray-900 text-white">
<div className="max-w-screen-xl flex items-center justify-between mx-auto p-4">
<div className="flex items-center">
<h1 className="text-xl font-medium">AleeBot</h1>
</div>
<div className="flex items-center space-x-4">
<p className="text-sm md:text-base">Welcome {session.user?.username}!</p>
<SignOut />
</div>
</div>
</nav>
<Guilds session={session} />
</div>
)
}
|