Only show footer in production

This commit is contained in:
Richard Roberson 2025-02-04 03:18:20 -07:00
parent d025227518
commit 74b486139d
2 changed files with 6 additions and 1 deletions

View file

@ -2,6 +2,8 @@
NEXT_PUBLIC_OPENAI_API_KEY=your_openai_api_key_here
# OpenAI API Base URL (default)
# To use a local TTS model server, I suggest using https://github.com/remsky/Kokoro-FastAPI
NEXT_PUBLIC_OPENAI_API_BASE=https://api.openai.com/v1
# Add other environment variables below as needed
NEXT_PUBLIC_NODE_ENV=development

View file

@ -44,11 +44,14 @@ export const metadata: Metadata = {
},
};
const isDev = process.env.NEXT_PUBLIC_NODE_ENV !== 'production';
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<head>
@ -62,7 +65,7 @@ export default function RootLayout({
<div className="bg-base rounded-lg shadow-lg">
{children}
</div>
<Footer />
{!isDev && <Footer />}
</div>
</div>
</Providers>