Skip to content

Commit 69fb355

Browse files
Revert "ref(checkout v3): Clean up routing (#103069)"
This reverts commit 1596475. Co-authored-by: isabellaenriquez <45607721+isabellaenriquez@users.noreply.github.com>
1 parent 32efff5 commit 69fb355

34 files changed

+85
-64
lines changed

src/sentry/organizations/absolute_url.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
re.compile(r"^\/?(?!settings)[^/]+\/([^/]+)\/getting-started\/(.*)"),
2828
r"/getting-started/\1/\2",
2929
),
30-
(re.compile(r"^\/?checkout\/[^/]+\/?.*"), r"/checkout/"),
3130
]
3231

3332

static/app/utils/url/normalizeUrl.spec.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ describe('normalizeUrl', () => {
7979
['/onboarding/acme/', '/onboarding/'],
8080
['/onboarding/acme/project/', '/onboarding/project/'],
8181

82-
['/checkout/', '/checkout/'],
83-
['/checkout/acme/', '/checkout/'],
84-
8582
['/organizations/new/', '/organizations/new/'],
8683
['/organizations/albertos-organizations/issues/', '/issues/'],
8784
[

static/app/utils/url/normalizeUrl.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const NORMALIZE_PATTERNS: Array<[pattern: RegExp, replacement: string]> = [
2222
// Handles /org-slug/project-slug/getting-started/platform/ -> /getting-started/project-slug/platform/
2323
[/^\/?(?!settings)[^/]+\/([^/]+)\/getting-started\/(.*)/, '/getting-started/$1/$2'],
2424
[/^\/?accept-terms\/[^/]*\/?$/, '/accept-terms/'],
25-
[/^\/?checkout\/[^/]+\/?.*$/, '/checkout/'],
2625
];
2726

2827
type NormalizeUrlOptions = {

static/app/views/performance/newTraceDetails/traceTypeWarnings/errorsOnlyWarnings.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ function PerformanceQuotaExceededWarning(props: ErrorOnlyWarningsProps) {
174174
props.tree.shape
175175
);
176176
browserHistory.push({
177-
pathname: `/checkout/?referrer=trace-view`,
177+
pathname: `/settings/billing/checkout/?referrer=trace-view`,
178178
query: {
179179
skipBundles: true,
180180
},

static/gsApp/components/addEventsCTA.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ function AddEventsCTA(props: Props) {
108108
}, 0);
109109
};
110110

111-
const checkoutUrl = `/checkout/?referrer=${referrer}`;
111+
const checkoutUrl = `/settings/${organization.slug}/billing/checkout/?referrer=${referrer}`;
112112
const subscriptionUrl = `/settings/${organization.slug}/billing/overview/`;
113113

114114
switch (action) {

static/gsApp/components/ai/AiSetupDataConsent.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
8484
const autofixAcknowledgeMutation = useSeerAcknowledgeMutation();
8585

8686
function handlePurchaseSeer() {
87-
navigate(`/checkout/?referrer=ai_setup_data_consent`);
87+
navigate(`/settings/billing/checkout/?referrer=ai_setup_data_consent`);
8888
}
8989

9090
function handleAddBudget() {
@@ -93,7 +93,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
9393
}
9494
if (isPerCategoryOnDemand) {
9595
// Seer does not support per category on demand budgets, so we need to redirect to the checkout page to prompt the user to switch
96-
navigate('/checkout/?referrer=ai_setup_data_consent#step3');
96+
navigate(`/settings/billing/checkout/?referrer=ai_setup_data_consent#step3`);
9797
return;
9898
}
9999
openOnDemandBudgetEditModal({

static/gsApp/components/crons/cronsBannerUpgradeCTA.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export function CronsBannerUpgradeCTA({hasBillingAccess}: UpgradeCTAProps) {
2121
if (hasBillingAccess) {
2222
return (
2323
<LinkButton
24-
href={normalizeUrl('/checkout/?referrer=crons_banner_upgrade_cta')}
24+
href={normalizeUrl(`/settings/${organization.slug}/billing/checkout/`)}
2525
size="xs"
2626
analyticsEventName="Crons: Clicked Trial Banner CTA"
2727
analyticsEventKey="crons.clicked_trial_banner_cta"

static/gsApp/components/features/dateRangeQueryLimitFooter.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ function DateRangeQueryLimitFooter({
3030
subscription,
3131
upsellDefaultSelection,
3232
}: Props) {
33-
const checkoutUrl = normalizeUrl(`/checkout/?referrer=checkout-${source}`);
33+
const checkoutUrl = normalizeUrl(
34+
`/settings/${organization.slug}/billing/checkout/?referrer=checkout-${source}`
35+
);
3436

3537
const canTrial = subscription.canTrial;
3638

static/gsApp/components/features/disabledPerformancePage.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ function DisabledPerformancePage({
6363
id: 'disabled-performance-page',
6464
title: t('Upgrade Now'),
6565
shortTitle: t('Upgrade'),
66-
url: new URL(`/checkout/`, window.location.origin).toString(),
66+
url: new URL(
67+
`/settings/${organization.slug}/billing/checkout/`,
68+
window.location.origin
69+
).toString(),
6770
},
6871
}}
6972
>

static/gsApp/components/gsBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ class GSBanner extends Component<Props, State> {
10141014
// if there are deactivated members, than anyone who doesn't have org:billing will be
10151015
// prevented from accessing this view anyways cause they will be deactivated
10161016
if (isOverMemberLimit && !deactivatedMemberDismissed && this.hasBillingPerms) {
1017-
const checkoutUrl = '/checkout/?referrer=deactivated_member_header';
1017+
const checkoutUrl = `/settings/${organization.slug}/billing/checkout/?referrer=deactivated_member_header`;
10181018
const wrappedNumber = <strong>{membersDeactivatedFromLimit}</strong>;
10191019
// only disabling members if the plan allows exactly one member
10201020
return (

0 commit comments

Comments
 (0)