mirror of
https://github.com/R0m1k3/Menu.git
synced 2026-10-13 10:19:34 +02:00
feat: implement admin dashboard with authentication and title management capabilities
This commit is contained in:
1 parent
d253eff0fa
commit
0bfed1adf2
4 files changed
+115
-1
No files matched your search
@@ -6,6 +6,7 @@ import { LogOut, ArrowLeft, Trash2 } from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { AddButtonForm } from '@/components/AddButtonForm';
|
||||
import { AdminButtonRow } from '@/components/AdminButtonRow';
|
||||
import { EditTitleForm } from '@/components/EditTitleForm';
|
||||
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
@@ -17,6 +18,9 @@ export default async function AdminPage() {
|
||||
orderBy: { order: 'asc' },
|
||||
});
|
||||
|
||||
const titleConfig = await prisma.config.findUnique({ where: { id: 'app_title' } });
|
||||
const appTitle = titleConfig?.value || 'Menu Application';
|
||||
|
||||
return (
|
||||
<div style={{ minHeight: '100vh', padding: '1.5rem 2rem', maxWidth: '860px', margin: '0 auto' }}>
|
||||
|
||||
@@ -70,6 +74,9 @@ export default async function AdminPage() {
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{/* Edit Title Form */}
|
||||
<EditTitleForm currentTitle={appTitle} />
|
||||
|
||||
{/* Add form */}
|
||||
<AddButtonForm />
|
||||
|
||||
|
||||
Reference in new issue
Block a user