2024-11-26 20:30:52 -05:00
|
|
|
import { verifySession } from "@app/lib/auth/verifySession";
|
2024-11-02 15:44:48 -04:00
|
|
|
import { Metadata } from "next";
|
2024-11-26 20:30:52 -05:00
|
|
|
import { redirect } from "next/navigation";
|
|
|
|
import { cache } from "react";
|
2024-11-02 15:44:48 -04:00
|
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
|
title: `Setup - Pangolin`,
|
|
|
|
description: "",
|
|
|
|
};
|
|
|
|
|
2024-10-19 16:37:40 -04:00
|
|
|
export default async function SetupLayout({
|
|
|
|
children,
|
|
|
|
}: {
|
|
|
|
children: React.ReactNode;
|
|
|
|
}) {
|
2024-11-26 20:30:52 -05:00
|
|
|
const getUser = cache(verifySession);
|
|
|
|
const user = await getUser();
|
|
|
|
|
|
|
|
if (!user) {
|
|
|
|
redirect("/");
|
|
|
|
}
|
|
|
|
|
2024-10-19 16:37:40 -04:00
|
|
|
return <div className="mt-32">{children}</div>;
|
|
|
|
}
|