Adds BASE_URL to callbackUrl in signup page and Shell component (#1882)

* add WEBSITE_URL to callbackUrl in signup page and Shell component

* fix: WEBSITE_URL -> BASE_URL, login missing do in another pr maybe

Co-authored-by: Agusti Fernandez <[email protected]>
Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Agusti Fernandez <[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-21 13:09:56 -07:00
1 parent 9863178025
commit 373bc1660c
2 files changed
+13 -4

No files matched your search

+2 -1
View File
@@ -22,6 +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 { shouldShowOnboarding } from "@lib/getting-started";
import { useLocale } from "@lib/hooks/useLocale";
import { collectPageParameters, telemetryEventTypes, useTelemetry } from "@lib/telemetry";
@@ -61,7 +62,7 @@ function useRedirectToLoginIfUnauthenticated() {
router.replace({
pathname: "/auth/login",
query: {
callbackUrl: `${location.pathname}${location.search}`,
callbackUrl: `${BASE_URL}/${location.pathname}${location.search}`,
},
});
}