Skip to content

Commit b4640e2

Browse files
committed
chore(code): set billing redirect URL to scroll to phc item
1 parent 5298cb9 commit b4640e2

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

packages/ui/src/utils/urls.test.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,16 @@ describe("getPostHogUrl", () => {
2828

2929
describe("getBillingUrl", () => {
3030
it.each([
31-
["us", "https://us.posthog.com/organization/billing/overview"],
32-
["eu", "https://eu.posthog.com/organization/billing/overview"],
31+
[
32+
"us",
33+
"https://us.posthog.com/organization/billing/overview?products=posthog_code_usage",
34+
],
35+
[
36+
"eu",
37+
"https://eu.posthog.com/organization/billing/overview?products=posthog_code_usage",
38+
],
3339
] as const)(
34-
"points at /organization/billing/overview on %s",
40+
"points at /organization/billing/overview?products=posthog_code_usage on %s",
3541
(region, expected) => {
3642
expect(getBillingUrl(region)).toBe(expected);
3743
},

packages/ui/src/utils/urls.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,8 @@ export function getPostHogUrl(
1616
export function getBillingUrl(
1717
regionOverride?: CloudRegion | null,
1818
): string | null {
19-
return getPostHogUrl("/organization/billing/overview", regionOverride);
19+
return getPostHogUrl(
20+
"/organization/billing/overview?products=posthog_code_usage",
21+
regionOverride,
22+
);
2023
}

0 commit comments

Comments
 (0)