From ecbdfea8180630fa413b7ecedcd6027f367ca060 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Date: Tue, 22 Feb 2022 22:23:55 +0100 Subject: [PATCH] Adds BASE_URL to connectIntegrations (#1883) --- apps/web/components/integrations/ConnectIntegrations.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/web/components/integrations/ConnectIntegrations.tsx b/apps/web/components/integrations/ConnectIntegrations.tsx index 3a30c9a52f..524a4abe35 100644 --- a/apps/web/components/integrations/ConnectIntegrations.tsx +++ b/apps/web/components/integrations/ConnectIntegrations.tsx @@ -2,6 +2,7 @@ import type { IntegrationOAuthCallbackState } from "pages/api/integrations/types import { useState } from "react"; import { useMutation } from "react-query"; +import { BASE_URL } from "@lib/config/constants"; import { AddAppleIntegrationModal } from "@lib/integrations/calendar/components/AddAppleIntegration"; import { AddCalDavIntegrationModal } from "@lib/integrations/calendar/components/AddCalDavIntegration"; @@ -17,7 +18,7 @@ export default function ConnectIntegration(props: { const mutation = useMutation(async () => { const state: IntegrationOAuthCallbackState = { - returnTo: location.pathname + location.search, + returnTo: BASE_URL + location.pathname + location.search, }; const stateStr = encodeURIComponent(JSON.stringify(state)); const searchParams = `?state=${stateStr}`;