From c7b22f9cf99e0d484d1633024f1e299d8e58e293 Mon Sep 17 00:00:00 2001 From: cc Date: Wed, 15 Apr 2026 17:37:33 +0200 Subject: [PATCH] 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 --- next.config.ts | 11 ++++++++++- src/app/layout.tsx | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/next.config.ts b/next.config.ts index c39691a..69df911 100644 --- a/next.config.ts +++ b/next.config.ts @@ -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; diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 23e21ea..61a6a0c 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -35,11 +35,11 @@ export default function RootLayout({ className={`${geistSans.variable} ${geistMono.variable} antialiased`} > -
+
-
{children}
+
{children}