import type { Metadata } from "next"; import "./globals.css"; import { SiteShell } from "@/app/components/site-shell"; import { getCategories, getFavicon } from "@/lib/meshkee/api"; import { site } from "@/lib/site-data"; export async function generateMetadata(): Promise { let icon = site.logo; try { const favicon = await getFavicon(); if (favicon.faviconUrl) icon = favicon.faviconUrl; } catch { // keep default local logo } return { title: site.title, description: site.description, icons: [{ url: icon }], }; } export default async function RootLayout({ children, }: Readonly<{ children: React.ReactNode; }>) { const categories = await getCategories("product").catch(() => []); return ( {children} ); }