feat: implement dynamic categories, admin category CRUD, fix routing and cleanup
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user