Skip to content

Commit

Permalink
feat: use 2nd upgrade form (#2465)
Browse files Browse the repository at this point in the history
closes codecov/engineering-team#778

Adds the new form component to the upgrade page plan
  • Loading branch information
adrian-codecov authored Dec 19, 2023
1 parent 554ea9e commit cc29232
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 4 additions & 9 deletions src/pages/PlanPage/subRoutes/UpgradePlanPage/UpgradePlanPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from 'shared/utils/billing'

import UpgradeDetails from './UpgradeDetails'
import UpgradeForm from './UpgradeForm'
import UpgradeForm2 from './UpgradeForm2'

import { useSetCrumbs } from '../../context'

Expand All @@ -20,8 +20,8 @@ function UpgradePlanPage() {
const setCrumbs = useSetCrumbs()
const { data: accountDetails } = useAccountDetails({ provider, owner })
const { data: plans } = useAvailablePlans({ provider, owner })
const { proPlanMonth, proPlanYear } = useProPlans({ plans })
const { sentryPlanMonth, sentryPlanYear } = findSentryPlans({ plans })
const { proPlanYear } = useProPlans({ plans })
const { sentryPlanYear } = findSentryPlans({ plans })

const plan = accountDetails?.rootOrganization?.plan ?? accountDetails?.plan

Expand All @@ -46,12 +46,7 @@ function UpgradePlanPage() {
return (
<div className="flex flex-col gap-8 md:w-11/12 md:flex-row lg:w-10/12">
<UpgradeDetails selectedPlan={selectedPlan} />
<UpgradeForm
accountDetails={accountDetails}
proPlanYear={proPlanYear}
proPlanMonth={proPlanMonth}
sentryPlanYear={sentryPlanYear}
sentryPlanMonth={sentryPlanMonth}
<UpgradeForm2
selectedPlan={selectedPlan}
setSelectedPlan={setSelectedPlan}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Plans } from 'shared/utils/billing'

import UpgradePlanPage from './UpgradePlanPage'

jest.mock('./UpgradeForm', () => () => 'UpgradeForm')
jest.mock('./UpgradeForm2', () => () => 'UpgradeForm2')

const plans = [
{
Expand Down

0 comments on commit cc29232

Please sign in to comment.