16 lines
408 B
TypeScript
16 lines
408 B
TypeScript
import { GetUser } from "@/actions/auth";
|
|
import { redirect } from "next/navigation";
|
|
import MeComponent from "./component";
|
|
import { getConsents } from "@/actions/consents";
|
|
|
|
export default async function Me() {
|
|
const user = await GetUser();
|
|
|
|
if (!user) {
|
|
redirect("/api/auth/initiate");
|
|
}
|
|
|
|
var consents = await getConsents();
|
|
|
|
return <MeComponent userData={user} consentsData={consents} />;
|
|
} |