feat: implement dynamic categories, admin category CRUD, fix routing and cleanup

This commit is contained in:
AyrisAI
2026-07-13 13:51:48 +03:00
parent 2f2dafcfb9
commit 5b44c78396
54 changed files with 3619 additions and 473 deletions
+4 -1
View File
@@ -1,3 +1,4 @@
import { mockDb } from '../../lib/mockDb';
import type { Metadata } from "next";
import { Unbounded, Golos_Text, IBM_Plex_Mono } from "next/font/google";
import { NextIntlClientProvider } from 'next-intl';
@@ -57,6 +58,8 @@ export default async function RootLayout({
const pathname = headersList.get('x-pathname') || '';
const hideNavbarFooter = pathname.includes('/admin') || pathname.includes('/login');
const categories = await mockDb.getCategories();
return (
<html
lang={locale}
@@ -64,7 +67,7 @@ export default async function RootLayout({
>
<body className="min-h-full flex flex-col font-sans" suppressHydrationWarning>
<NextIntlClientProvider messages={messages}>
{!hideNavbarFooter && <Navbar />}
{!hideNavbarFooter && <Navbar categories={categories} />}
{children}
{!hideNavbarFooter && <Footer />}
</NextIntlClientProvider>