From 8874bc604ca45cafa9acfa0135de0327314aaa20 Mon Sep 17 00:00:00 2001 From: Vadym Samoilenko Date: Wed, 1 Apr 2026 12:59:42 +0100 Subject: [PATCH] Fix: remove double basePath prefix in deploy widget SWR key SWR middleware already prepends NEXT_PUBLIC_BASE_PATH; statusUrl must start with /deploy-api/... not /${bp}/deploy-api/... Co-Authored-By: Claude Sonnet 4.6 --- src/components/widgets/deploy/deploy.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/widgets/deploy/deploy.jsx b/src/components/widgets/deploy/deploy.jsx index a9243aca..e4a2949f 100644 --- a/src/components/widgets/deploy/deploy.jsx +++ b/src/components/widgets/deploy/deploy.jsx @@ -24,7 +24,8 @@ function formatTime(iso) { export default function Deploy({ options }) { const { service, label, apiBase = "/deploy-api" } = options ?? {}; const bp = process.env.NEXT_PUBLIC_BASE_PATH ?? ""; - const statusUrl = service ? `${bp}${apiBase}/status/${service}` : null; + // SWR middleware already prepends bp, so statusUrl must NOT include it + const statusUrl = service ? `${apiBase}/status/${service}` : null; const { data, mutate } = useSWR(statusUrl, { refreshInterval: (d) => (d?.status === "running" ? 2000 : 10000),