2024-10-06 18:08:26 -04:00
|
|
|
import { verifySession } from "@app/lib/verifySession";
|
|
|
|
import { LandingProvider } from "@app/providers/LandingProvider";
|
|
|
|
import { redirect } from "next/navigation";
|
|
|
|
|
|
|
|
export default async function Page() {
|
2024-10-06 18:43:20 -04:00
|
|
|
const user = await verifySession();
|
2024-10-06 18:08:26 -04:00
|
|
|
|
|
|
|
if (!user) {
|
|
|
|
redirect("/auth/login");
|
|
|
|
}
|
|
|
|
|
2024-10-12 21:30:35 -04:00
|
|
|
console.log(user);
|
|
|
|
|
2024-10-06 18:08:26 -04:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<LandingProvider user={user}>
|
2024-10-12 21:30:35 -04:00
|
|
|
<p>Logged in as {user.email}</p>
|
2024-10-06 18:08:26 -04:00
|
|
|
</LandingProvider>
|
|
|
|
</>
|
|
|
|
);
|
2024-09-27 19:48:49 -04:00
|
|
|
}
|