- Updated translation utility to improve consistency and reduce redundancy. - Removed deprecated useTrans hook and related code. - Introduced a new Zustand store for managing translations and locale settings. - Cleaned up unused hooks and files related to localization.
30 lines
1.3 KiB
TypeScript
30 lines
1.3 KiB
TypeScript
import { type ReactNode } from "react";
|
|
|
|
import ApplicationLogo from "@/back/Components/ApplicationLogo";
|
|
import AppFooter from "@/back/Components/Layout/AppFooter";
|
|
import AppSettings from "@/back/Components/Layout/Settings/AppSettings";
|
|
import { ThemeProvider } from "@/back/providers/ThemeProvider";
|
|
import AppHead from "@/components/layout/AppHead";
|
|
import { Card } from "@/components/ui/card";
|
|
import trans from "@/hooks/use-translations";
|
|
|
|
export default function GuestLayout({ children }: { children: ReactNode }) {
|
|
const transTitle = trans("back.login_title");
|
|
const transDescription = trans("back.login_description");
|
|
|
|
return (
|
|
<ThemeProvider defaultTheme="light" storageKey="vite-ui-theme">
|
|
<AppHead title={transTitle} description={transDescription} />
|
|
<div className="flex min-h-screen flex-col justify-center items-center px-8">
|
|
<AppSettings className="container absolute top-0 start-1/2 transform -translate-x-1/2 text-right my-4" />
|
|
<section className="flex flex-1 flex-col justify-center items-center gap-y-6 pt-4">
|
|
<ApplicationLogo />
|
|
<Card className="text-center shadow-md sm:max-w-md sm:rounded-lg bg-secondary w-full">
|
|
{children}
|
|
</Card>
|
|
</section>
|
|
<AppFooter />
|
|
</div>
|
|
</ThemeProvider>
|
|
);
|
|
}
|