import React from 'react'; import localFont from "next/font/local"; import "./globals.css"; import RootLayoutClient from "./components/RootLayoutClient"; // Get the short commit hash from env (set in dev via .env or prebuild script) const isDev = process.env.NODE_ENV === 'development'; const shortCommit = isDev ? process.env.NEXT_PUBLIC_COMMIT_SHA || '' : ''; export const metadata = { title: { template: isDev && shortCommit ? `mice (dev: ${shortCommit}) | %s` : 'mice | %s', default: isDev && shortCommit ? `mice (dev: ${shortCommit})` : 'mice', }, description: 'a very awesome music streaming service', robots: { index: true, follow: true, nocache: true, googleBot: { index: true, follow: false, noimageindex: true, 'max-video-preview': -1, 'max-image-preview': 'large', 'max-snippet': -1, }, }, }; const geistSans = localFont({ src: "./fonts/GeistVF.woff", variable: "--font-geist-sans", weight: "100 900", }); const geistMono = localFont({ src: "./fonts/GeistMonoVF.woff", variable: "--font-geist-mono", weight: "100 900", }); interface LayoutProps { children: React.ReactNode; } export default function Layout({ children }: LayoutProps) { return (