diff --git a/frontend/src/components/ChatSupportGateway/ChatSupportGateway.tsx b/frontend/src/components/ChatSupportGateway/ChatSupportGateway.tsx index 8d9f3bd6b0..94e8de8194 100644 --- a/frontend/src/components/ChatSupportGateway/ChatSupportGateway.tsx +++ b/frontend/src/components/ChatSupportGateway/ChatSupportGateway.tsx @@ -45,6 +45,7 @@ export default function ChatSupportGateway(): JSX.Element { }, ); const { pathname } = useLocation(); + const handleAddCreditCard = (): void => { logEvent('Add Credit card modal: Clicked', { source: `intercom icon`, @@ -52,7 +53,7 @@ export default function ChatSupportGateway(): JSX.Element { }); updateCreditCard({ - url: window.location.href, + url: window.location.origin, }); }; diff --git a/frontend/src/components/LaunchChatSupport/LaunchChatSupport.tsx b/frontend/src/components/LaunchChatSupport/LaunchChatSupport.tsx index ccd2f46ca8..e04004a292 100644 --- a/frontend/src/components/LaunchChatSupport/LaunchChatSupport.tsx +++ b/frontend/src/components/LaunchChatSupport/LaunchChatSupport.tsx @@ -153,7 +153,7 @@ function LaunchChatSupport({ }); updateCreditCard({ - url: window.location.href, + url: window.location.origin, }); }; diff --git a/frontend/src/container/BillingContainer/BillingContainer.tsx b/frontend/src/container/BillingContainer/BillingContainer.tsx index e5d4ee810d..9906cace1e 100644 --- a/frontend/src/container/BillingContainer/BillingContainer.tsx +++ b/frontend/src/container/BillingContainer/BillingContainer.tsx @@ -333,7 +333,7 @@ export default function BillingContainer(): JSX.Element { }); updateCreditCard({ - url: window.location.href, + url: window.location.origin, }); } else { logEvent('Billing : Manage Billing', { @@ -342,7 +342,7 @@ export default function BillingContainer(): JSX.Element { }); manageCreditCard({ - url: window.location.href, + url: window.location.origin, }); } // eslint-disable-next-line react-hooks/exhaustive-deps diff --git a/frontend/src/pages/Support/Support.tsx b/frontend/src/pages/Support/Support.tsx index d3acd09ee6..edc9066d2f 100644 --- a/frontend/src/pages/Support/Support.tsx +++ b/frontend/src/pages/Support/Support.tsx @@ -143,7 +143,7 @@ export default function Support(): JSX.Element { }); updateCreditCard({ - url: window.location.href, + url: window.location.origin, }); }; diff --git a/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.tsx b/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.tsx index 4daac02126..c0cd0877ba 100644 --- a/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.tsx +++ b/frontend/src/pages/WorkspaceLocked/WorkspaceLocked.tsx @@ -109,7 +109,7 @@ export default function WorkspaceBlocked(): JSX.Element { logEvent('Workspace Blocked: User Clicked Update Credit Card', {}); updateCreditCard({ - url: window.location.href, + url: window.location.origin, }); // eslint-disable-next-line react-hooks/exhaustive-deps }, [updateCreditCard]);