diff --git a/apps/web/components/Shell.tsx b/apps/web/components/Shell.tsx index e43864f80c..75fa88c70b 100644 --- a/apps/web/components/Shell.tsx +++ b/apps/web/components/Shell.tsx @@ -22,7 +22,7 @@ import TrialBanner from "@ee/components/TrialBanner"; import HelpMenuItemDynamic from "@ee/lib/intercom/HelpMenuItemDynamic"; import classNames from "@lib/classNames"; -import { BASE_URL } from "@lib/config/constants"; +import { NEXT_PUBLIC_BASE_URL } from "@lib/config/constants"; import { shouldShowOnboarding } from "@lib/getting-started"; import { useLocale } from "@lib/hooks/useLocale"; import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry"; @@ -62,7 +62,7 @@ function useRedirectToLoginIfUnauthenticated() { router.replace({ pathname: "/auth/login", query: { - callbackUrl: `${BASE_URL}/${location.pathname}${location.search}`, + callbackUrl: `${NEXT_PUBLIC_BASE_URL}/${location.pathname}${location.search}`, }, }); } @@ -380,7 +380,7 @@ function UserDropdown({ small }: { small?: boolean }) { await signIn("Cal.com", { - callbackUrl: (`${BASE_URL}/${router.query.callbackUrl}` || "") as string, + callbackUrl: (`${NEXT_PUBLIC_BASE_URL}/${router.query.callbackUrl}` || "") as string, }) ) .catch((err) => { @@ -130,7 +130,7 @@ export default function Signup({ email }: Props) { className="w-5/12 justify-center" onClick={() => signIn("Cal.com", { - callbackUrl: (`${BASE_URL}/${router.query.callbackUrl}` || "") as string, + callbackUrl: (`${NEXT_PUBLIC_BASE_URL}/${router.query.callbackUrl}` || "") as string, }) }> {t("login_instead")} @@ -184,7 +184,7 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => { return { redirect: { permanent: false, - destination: "/auth/login?callbackUrl=" + `${BASE_URL}/${ctx.query.callbackUrl}`, + destination: "/auth/login?callbackUrl=" + `${NEXT_PUBLIC_BASE_URL}/${ctx.query.callbackUrl}`, }, }; }