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, }, }, viewport: { width: 'device-width', initialScale: 1, maximumScale: 1, userScalable: false, }, appleWebApp: { capable: true, statusBarStyle: 'black-translucent', title: isDev && shortCommit ? `mice (dev: ${shortCommit})` : 'mice', }, formatDetection: { telephone: false, }, other: { 'apple-mobile-web-app-capable': 'yes', 'apple-mobile-web-app-status-bar-style': 'black-translucent', 'format-detection': 'telephone=no', }, icons: { icon: [ { url: '/favicon.ico', sizes: '48x48' }, { url: '/icon-192.png', sizes: '192x192', type: 'image/png' }, { url: '/icon-512.png', sizes: '512x512', type: 'image/png' }, ], apple: [ { url: '/apple-touch-icon-precomposed.png', sizes: '180x180', type: 'image/png' }, ], }, }; 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 (