mirror of
https://github.com/fosrl/pangolin.git
synced 2026-04-28 16:57:14 +00:00
23 lines
493 B
TypeScript
23 lines
493 B
TypeScript
import { verifySession } from "@app/lib/auth/verifySession";
|
|
import { redirect } from "next/navigation";
|
|
import { cache } from "react";
|
|
|
|
type GeneralSettingsProps = {
|
|
children: React.ReactNode;
|
|
params: Promise<{ orgId: string }>;
|
|
};
|
|
|
|
export default async function GeneralSettingsPage({
|
|
children,
|
|
params
|
|
}: GeneralSettingsProps) {
|
|
const getUser = cache(verifySession);
|
|
const user = await getUser();
|
|
|
|
if (!user) {
|
|
redirect(`/`);
|
|
}
|
|
|
|
return children;
|
|
}
|