Skip to content

Commit 1586143

Browse files
authored
Link to the Design Studio pricing page for upgrades (#206)
1 parent a15e61b commit 1586143

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

src/components/AccountMenu.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
</p>
7878
</div>
7979
<a
80-
href={paths.ZOO_BILLING}
80+
href={paths.ZOO_ACCOUNT}
8181
class="menu-button"
8282
on:keydown={dismiss}
8383
target="_blank"

src/components/BlockedMessage.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
<div class="p-4 tracking-wide text-xl text-blue border border-blue bg-blue/10 rounded">
99
{#if blockedReason === 'missing_payment_method'}
1010
<p>
11-
You've used up all your free credits for this month. To continue using Text-to-CAD, please add
12-
a payment method to <a href={paths.ZOO_BILLING} class="underline">your Zoo account</a>.
11+
You've used up all your free credits for this month. To continue using Text-to-CAD, please
12+
<a href={paths.ZOO_UPGRADE} class="underline">upgrade your account</a>.
1313
</p>
1414
{:else if blockedReason === 'payment_method_failed'}
1515
<p>
1616
Your payment method failed to process, and you are out of free credits for this month. To
1717
continue using Text-to-CAD, please provide a new one within <a
18-
href={paths.ZOO_BILLING}
18+
href={paths.ZOO_ACCOUNT}
1919
class="underline">your Zoo account</a
2020
>.
2121
</p>

src/lib/paths.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export const paths = {
1515
VIEW: (viewId: string) => `/view/${viewId}`,
1616
SIGN_OUT: `/?${SIGN_OUT_PARAM}=true`,
1717
ZOO_SITE: SITE,
18-
ZOO_BILLING: SITE + '/account',
18+
ZOO_ACCOUNT: SITE + '/account',
19+
ZOO_UPGRADE: SITE + '/design-studio-pricing',
1920
ZOO_ML: SITE + '/machine-learning-api'
2021
} as const

tests/user.playwright.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ test('Shows banner if user is blocked for missing payment', async ({ context })
99
await page.goto('http://localhost:3000/dashboard')
1010
await page.waitForLoadState('domcontentloaded')
1111

12-
const banner = page.getByText('payment method', { exact: false })
12+
const banner = page.getByText('your free credits', { exact: false })
1313
const bannerLink = banner.getByRole('link')
1414
await expect(banner).toBeVisible()
1515
await expect(bannerLink).toBeVisible()
16-
await expect(bannerLink).toHaveAttribute('href', /\/account/)
16+
await expect(bannerLink).toHaveAttribute('href', /\/design-studio-pricing/)
1717
})
1818

1919
test('Shows banner if user is blocked for failed payment', async ({ context }) => {

0 commit comments

Comments
 (0)