import ProfileIcon from "@app/components/ProfileIcon"; import ThemeSwitcher from "@app/components/ThemeSwitcher"; import { Separator } from "@app/components/ui/separator"; import { priv } from "@app/lib/api"; import { verifySession } from "@app/lib/auth/verifySession"; import UserProvider from "@app/providers/UserProvider"; import { GetLicenseStatusResponse } from "@server/routers/license"; import { AxiosResponse } from "axios"; import { ExternalLink } from "lucide-react"; import { Metadata } from "next"; import { cache } from "react"; import { getTranslations } from "next-intl/server"; export const metadata: Metadata = { title: `Auth - Pangolin`, description: "" }; type AuthLayoutProps = { children: React.ReactNode; }; export default async function AuthLayout({ children }: AuthLayoutProps) { const getUser = cache(verifySession); const user = await getUser(); const t = await getTranslations(); const hideFooter = true; const licenseStatusRes = await cache( async () => await priv.get>( "/license/status" ) )(); const licenseStatus = licenseStatusRes.data.data; return (
{children}
{!( hideFooter || ( licenseStatus.isHostLicensed && licenseStatus.isLicenseValid) ) && ( )}
); }