From 7040b6637c0b940ef28243a25df0eb8cd8582efc Mon Sep 17 00:00:00 2001 From: Kamran Ahmed Date: Fri, 1 Mar 2024 18:10:21 +0000 Subject: [PATCH] Persist query parameters on ai and custom roadmap page --- src/components/AuthenticationFlow/GitHubButton.tsx | 2 +- src/components/AuthenticationFlow/GoogleButton.tsx | 2 +- src/components/AuthenticationFlow/LinkedInButton.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/AuthenticationFlow/GitHubButton.tsx b/src/components/AuthenticationFlow/GitHubButton.tsx index 3ebc3a628..3deb4c569 100644 --- a/src/components/AuthenticationFlow/GitHubButton.tsx +++ b/src/components/AuthenticationFlow/GitHubButton.tsx @@ -101,7 +101,7 @@ export function GitHubButton(props: GitHubButtonProps) { // For non authentication pages, we want to redirect back to the page // the user was on before they clicked the social login button if (!['/login', '/signup'].includes(window.location.pathname)) { - const pagePath = ['/respond-invite', '/befriend'].includes( + const pagePath = ['/respond-invite', '/befriend', '/r', '/ai'].includes( window.location.pathname, ) ? window.location.pathname + window.location.search diff --git a/src/components/AuthenticationFlow/GoogleButton.tsx b/src/components/AuthenticationFlow/GoogleButton.tsx index 3d92b1bde..60b0dcf84 100644 --- a/src/components/AuthenticationFlow/GoogleButton.tsx +++ b/src/components/AuthenticationFlow/GoogleButton.tsx @@ -97,7 +97,7 @@ export function GoogleButton(props: GoogleButtonProps) { // For non authentication pages, we want to redirect back to the page // the user was on before they clicked the social login button if (!['/login', '/signup'].includes(window.location.pathname)) { - const pagePath = ['/respond-invite', '/befriend'].includes( + const pagePath = ['/respond-invite', '/befriend', '/r', '/ai'].includes( window.location.pathname, ) ? window.location.pathname + window.location.search diff --git a/src/components/AuthenticationFlow/LinkedInButton.tsx b/src/components/AuthenticationFlow/LinkedInButton.tsx index 851b2a9d8..6f36c319b 100644 --- a/src/components/AuthenticationFlow/LinkedInButton.tsx +++ b/src/components/AuthenticationFlow/LinkedInButton.tsx @@ -97,7 +97,7 @@ export function LinkedInButton(props: LinkedInButtonProps) { // For non authentication pages, we want to redirect back to the page // the user was on before they clicked the social login button if (!['/login', '/signup'].includes(window.location.pathname)) { - const pagePath = ['/respond-invite', '/befriend'].includes( + const pagePath = ['/respond-invite', '/befriend', '/r', '/ai'].includes( window.location.pathname, ) ? window.location.pathname + window.location.search