Files
zitadel/apps/login/app/(login)/template.tsx

37 lines
962 B
TypeScript
Raw Normal View History

2023-05-23 10:12:19 +02:00
import { BrandingSettings } from "@zitadel/server";
2023-04-14 17:22:59 +02:00
import React from "react";
2023-05-23 10:12:19 +02:00
import { getBrandingSettings, server } from "#/lib/zitadel";
import { Logo } from "#/ui/Logo";
2023-04-03 13:39:51 +02:00
2024-03-11 14:32:54 +01:00
export default async function Template({
2023-04-03 13:39:51 +02:00
children,
}: {
children: React.ReactNode;
}) {
2023-05-24 16:37:52 +02:00
const branding = await getBrandingSettings(server);
2023-05-23 10:12:19 +02:00
let partial: Partial<BrandingSettings> | undefined;
if (branding) {
partial = {
lightTheme: branding?.lightTheme,
darkTheme: branding?.darkTheme,
};
}
2023-04-03 13:39:51 +02:00
return (
2023-04-25 09:16:19 +02:00
<div className="mx-auto flex flex-col items-center space-y-4">
2023-04-14 17:22:59 +02:00
<div className="relative">
2023-05-23 10:15:51 +02:00
{branding && (
<Logo
lightSrc={branding.lightTheme?.logoUrl}
darkSrc={branding.darkTheme?.logoUrl}
height={150}
width={150}
/>
)}
2023-04-03 13:39:51 +02:00
</div>
<div className="w-full">{children}</div>
<div className="flex flex-row justify-between"></div>
</div>
);
}