admin/app/auth/layout.tsx
alisaza 3517a1c86c fix(auth): adjust layout width for better responsiveness
- Updated the layout width in `AuthLayout` to a fixed width of 400px for improved consistency and user experience.
2026-09-07 21:24:22 +03:30

56 lines
1.8 KiB
TypeScript

import type { Metadata } from 'next'
import React from 'react'
import Image from 'next/image'
import SessionProviders from '@/components/providers/SessionProviders'
import { withBasePath } from '@/constants/images'
import { ADMIN_PAGE_TITLES } from '@/constants/adminPageTitles'
import { texts } from '@/texts'
// Login/signup — already disallowed in robots.ts; noindex is defense in
// depth against the URL surfacing blank in search results if ever linked.
export const metadata: Metadata = {
title: ADMIN_PAGE_TITLES.auth,
robots: { index: false, follow: false },
}
const authHeroSrc = withBasePath('/images/auth-v2.png')
const logoSrc = withBasePath('/logo.svg')
const AuthLayout = ({ children }: { children: React.ReactNode }) => {
return (
<SessionProviders>
<section className="relative min-h-[100dvh] w-full overflow-hidden bg-background-primary">
<div
aria-hidden
className="absolute inset-0 bg-cover bg-center bg-no-repeat"
style={{ backgroundImage: `url(${authHeroSrc})` }}
/>
<div
aria-hidden
className="absolute inset-0 bg-black/20 backdrop-blur-md"
/>
<div className="relative z-10 flex min-h-[100dvh] w-full items-center justify-center p-4">
<div className="flex w-[400px] flex-col rounded-2xl bg-white/90 p-4 backdrop-blur-sm">
<div className="flex min-h-[400px] flex-1 flex-col items-center justify-center">
<Image
priority
alt={texts.auth.logoAlt}
className="mb-8 size-32"
height={200}
src={logoSrc}
width={200}
/>
{children}
</div>
</div>
</div>
</section>
</SessionProviders>
)
}
export default AuthLayout