From 44b887a9a007eb62b03b64d7a44154370fe0f4fd Mon Sep 17 00:00:00 2001 From: asepharyana Date: Thu, 20 Aug 2026 21:34:42 +0700 Subject: [PATCH] fix(web-ui): remove client-side onKeyDown from server component to fix 500 on /docs The search input's onKeyDown handler used window.location.href which is unavailable during SSR, causing the /docs page to crash. Replaced with a Link wrapper so it's fully server-rendered. --- apps/web/app/docs/page.tsx | 48 +++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/apps/web/app/docs/page.tsx b/apps/web/app/docs/page.tsx index 9c90486..7b535da 100644 --- a/apps/web/app/docs/page.tsx +++ b/apps/web/app/docs/page.tsx @@ -53,34 +53,28 @@ export default async function DocsIndexPage() {

{/* Search bar */} -
- + - - - { - if (e.key === "Enter" && e.currentTarget.value) { - window.location.href = `/search?q=${encodeURIComponent(e.currentTarget.value)}`; - } - }} - /> - - ↵ - + + + + + Search documents, tags, authors... + +
{/* Recent strip */}