@@ -14,7 +14,7 @@ import { LogoHead } from '../components/common/LogoHead'
1414import LandingLayout from '../components/layouts/LandingLayout'
1515import GitHubLoginButton from '../components/sections/login/GitHubLoginButton'
1616import { useAuth } from '../context/AuthContext'
17- import { getTrialTimeLeftLabel } from '../helpers'
17+ import { getPurchaseOrSubscribeRoute , getTrialTimeLeftLabel } from '../helpers'
1818
1919export interface AccountPageProps { }
2020
@@ -164,7 +164,7 @@ export default function AccountPage(_props: AccountPageProps) {
164164 { activePaidPlans . some ( p => ! p . interval ) &&
165165 ( ! ! ( ! freeTrialDays && authData . plan . interval ) ? (
166166 < Link
167- href = { `/purchase ${ qs . stringify (
167+ href = { `/${ getPurchaseOrSubscribeRoute ( ) } ${ qs . stringify (
168168 {
169169 plan : activePaidPlans . find ( p => ! p . interval ) !
170170 . cannonicalId ,
@@ -176,7 +176,7 @@ export default function AccountPage(_props: AccountPageProps) {
176176 </ Link >
177177 ) : (
178178 < Link
179- href = { `/purchase ${ qs . stringify (
179+ href = { `/${ getPurchaseOrSubscribeRoute ( ) } ${ qs . stringify (
180180 {
181181 plan : activePaidPlans . find ( p => ! p . interval ) !
182182 . cannonicalId ,
@@ -215,7 +215,7 @@ export default function AccountPage(_props: AccountPageProps) {
215215 authData . plan . transformUsage . divideBy > 1 ) )
216216 ) && (
217217 < Link
218- href = { `/purchase ${ qs . stringify (
218+ href = { `/${ getPurchaseOrSubscribeRoute ( ) } ${ qs . stringify (
219219 {
220220 action : 'update_seats' ,
221221 plan :
@@ -234,7 +234,7 @@ export default function AccountPage(_props: AccountPageProps) {
234234
235235 { ! ! ( authData . plan && authData . plan . interval ) && (
236236 < Link
237- href = { `/purchase ${ qs . stringify (
237+ href = { `/${ getPurchaseOrSubscribeRoute ( ) } ${ qs . stringify (
238238 {
239239 action : 'update_card' ,
240240 plan :
@@ -270,7 +270,7 @@ export default function AccountPage(_props: AccountPageProps) {
270270 ) : (
271271 < >
272272 { activePaidPlans . length === 1 && activePaidPlans [ 0 ] ? (
273- < Link href = "/purchase" >
273+ < Link href = { `/ ${ getPurchaseOrSubscribeRoute ( ) } ` } >
274274 < a className = "text-default" >
275275 { freeTrialDays
276276 ? 'Start free trial'
0 commit comments