From cf133145688ffccab1ecc63c10f4a3503c3e3533 Mon Sep 17 00:00:00 2001 From: MaheshtheDev <38828053+MaheshtheDev@users.noreply.github.com> Date: Fri, 24 Jul 2026 07:03:12 +0000 Subject: [PATCH] fix(web): preserve Slack override login redirect --- apps/web/components/slack-workspace-override.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/web/components/slack-workspace-override.tsx b/apps/web/components/slack-workspace-override.tsx index f8dc7c8f..1d415390 100644 --- a/apps/web/components/slack-workspace-override.tsx +++ b/apps/web/components/slack-workspace-override.tsx @@ -523,9 +523,10 @@ export function SlackWorkspaceOverride() { const shouldInspect = screen.kind === "loading" || screen.kind === "checking" const indeterminateAction = screen.kind === "checking" ? screen.indeterminateAction : false - const loginHref = `/login?redirect=${encodeURIComponent( - `/slack/workspace-override${requestId ? `?request=${encodeURIComponent(requestId)}` : ""}`, - )}` + const loginHref = + typeof window === "undefined" + ? "/login" + : `/login?redirect=${encodeURIComponent(window.location.href)}` const checkStatus = useCallback( (afterIndeterminateAction: boolean) => {