gluestick/src/app/me/page.tsx

19 lines
399 B
TypeScript

import { getUser } from "@/auth";
import { getUserInfo } from "@/ldap";
import AboutMe from "./AboutMe";
export default async function Page() {
const user = await getUser();
if (!user) {
window.location.href = "/login";
return;
}
const info = await getUserInfo(user);
if (info === null) {
window.location.href = "/login";
return;
}
return <AboutMe info={info} />;
}