Fixes undefined bug by replacing BASE_URL with NEXT_PUBLIC_BASE_URL in Shell and signup. (#1991)

* Replace BASE_URL with NEXT_PUBLIC_BASE_URL in Shell

* Replace BASE_URL with NEXT_PUBLIC_BASE_URL in apps/web/pages/auth/signup

Co-authored-by: Agusti Fernandez Pardo <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2022-02-27 22:34:08 +00:00
1 parent 981fb9c5be
commit eb59908c84
2 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -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 }) {
<img
className="rounded-full"
src={
(process.env.NEXT_PUBLIC_APP_URL || process.env.BASE_URL) +
(process.env.NEXT_PUBLIC_APP_URL || process.env.NEXT_PUBLIC_BASE_URL) +
"/" +
user?.username +
"/avatar.png"