Fix nested scrollbar issue on keys page, add local data proxy

- Change root layout from min-h-screen to h-screen with overflow-hidden
  to properly constrain viewport height
- Add min-h-0 to main element to allow flex shrinking
- Add rewrite rule to proxy /data/* to production data URL for local dev
- Make output: "export" conditional (production only) since rewrites
  require server mode
This commit is contained in:
cc
2026-04-15 17:37:33 +02:00
parent 511980887c
commit c7b22f9cf9
2 changed files with 12 additions and 3 deletions
+10 -1
View File
@@ -1,14 +1,23 @@
import type { NextConfig } from "next";
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
const isDev = process.env.NODE_ENV === "development";
const nextConfig: NextConfig = {
output: "export",
output: isDev ? undefined : "export",
basePath,
assetPrefix: basePath || undefined,
env: {
NEXT_PUBLIC_BUILD_TIME: new Date().toISOString(),
},
async rewrites() {
return [
{
source: "/data/:path*",
destination: "https://codecolor.ist/entdb-data/:path*",
},
];
},
};
export default nextConfig;
+2 -2
View File
@@ -35,11 +35,11 @@ export default function RootLayout({
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<div className="flex flex-col min-h-screen">
<div className="flex flex-col h-screen overflow-hidden">
<NavTop />
<Toaster />
<Suspense>
<main className="flex-1 flex flex-col">{children}</main>
<main className="flex-1 flex flex-col min-h-0">{children}</main>
</Suspense>
<Footer />
</div>