mirror of
https://github.com/SrIzan10/stack.git
synced 2026-06-06 01:06:54 +00:00
12 lines
370 B
TypeScript
12 lines
370 B
TypeScript
import { validateRequest } from "@/lib/auth";
|
|
|
|
export default async function Page() {
|
|
const { user } = await validateRequest()
|
|
return (
|
|
<div>
|
|
<h1 className="text-3xl font-bold text-center">Welcome {user?.username}!</h1>
|
|
<p>You are actually on a protected route!</p>
|
|
<p>Your ID is: {user!.id}</p>
|
|
</div>
|
|
)
|
|
} |