Skip to content

Commit 74b4861

Browse files
committed
Only show footer in production
1 parent d025227 commit 74b4861

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.env.template

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
NEXT_PUBLIC_OPENAI_API_KEY=your_openai_api_key_here
33

44
# OpenAI API Base URL (default)
5+
# To use a local TTS model server, I suggest using https://github.com/remsky/Kokoro-FastAPI
56
NEXT_PUBLIC_OPENAI_API_BASE=https://api.openai.com/v1
67

78
# Add other environment variables below as needed
9+
NEXT_PUBLIC_NODE_ENV=development

src/app/layout.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,14 @@ export const metadata: Metadata = {
4444
},
4545
};
4646

47+
const isDev = process.env.NEXT_PUBLIC_NODE_ENV !== 'production';
48+
4749
export default function RootLayout({
4850
children,
4951
}: {
5052
children: React.ReactNode;
5153
}) {
54+
5255
return (
5356
<html lang="en" suppressHydrationWarning>
5457
<head>
@@ -62,7 +65,7 @@ export default function RootLayout({
6265
<div className="bg-base rounded-lg shadow-lg">
6366
{children}
6467
</div>
65-
<Footer />
68+
{!isDev && <Footer />}
6669
</div>
6770
</div>
6871
</Providers>

0 commit comments

Comments
 (0)