Files
tabletten/components/AppLayout.tsx
2026-03-11 20:33:19 +01:00

45 lines
1.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client';
import LogoutButton from '@/components/LogoutButton';
import packageJson from '@/package.json';
interface AppLayoutProps {
children: React.ReactNode;
}
export default function AppLayout({ children }: AppLayoutProps) {
const version = packageJson.version;
const buildDate = process.env.NEXT_PUBLIC_BUILD_DATE || new Date().toLocaleDateString('de-DE', { day: '2-digit', month: '2-digit', year: 'numeric' });
return (
<div className="min-h-screen py-8 px-4">
<div className="max-w-316 mx-auto border-2 border-black rounded-xl bg-gray-200 p-6">
{/* Seitentitel */}
<h1 className="text-4xl font-bold text-center mb-6 tracking-tight">Tabletten-Check</h1>
<div className="max-w-6xl mx-auto">
{/* Logout-Button oben rechts */}
<div className="flex justify-end -mb-0.5">
<LogoutButton className="px-4 py-2 bg-red-600 hover:bg-red-700 text-white text-sm rounded-lg shadow-md" />
</div>
{/* Inhaltsbereich */}
<main className="border-2 border-black rounded-lg p-6 bg-[#FFFFDD]">
{children}
</main>
<footer className="mt-8 flex justify-between items-center text-sm text-gray-600 px-4">
<a href="mailto:rxf@gmx.de" className="hover:underline">
mailto:rxf@gmx.de
</a>
<div>Version {version} {buildDate}</div>
</footer>
</div>
</div>
</div>
);
}