File tree Expand file tree Collapse file tree 14 files changed +33
-19
lines changed
UpgradePlanPage/UpgradeForm/Controllers/ProPlanController Expand file tree Collapse file tree 14 files changed +33
-19
lines changed Original file line number Diff line number Diff line change 99 useAvailablePlans ,
1010 usePlanData ,
1111} from 'services/account'
12+ import { Provider } from 'shared/api/helpers'
1213import { BillingRate , shouldDisplayTeamCard } from 'shared/utils/billing'
1314import Spinner from 'ui/Spinner'
1415
@@ -25,7 +26,7 @@ const Loader = () => (
2526
2627function CancelPlanPage ( ) {
2728 const { provider, owner } = useParams < {
28- provider : string
29+ provider : Provider
2930 owner : string
3031 } > ( )
3132 const { data : accountDetailsData } = useAccountDetails ( { provider, owner } )
Original file line number Diff line number Diff line change 11import { useParams } from 'react-router-dom'
22
33import { useAccountDetails } from 'services/account'
4+ import { Provider } from 'shared/api/helpers'
45
56import AddressCard from './Address/AddressCard'
67import EmailAddress from './EmailAddress'
78import PaymentCard from './PaymentCard'
89
910interface URLParams {
10- provider : string
11+ provider : Provider
1112 owner : string
1213}
1314
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { useParams } from 'react-router-dom'
55import { z } from 'zod'
66
77import { useAccountDetails , useUpdateBillingEmail } from 'services/account'
8+ import { Provider } from 'shared/api/helpers'
89import A from 'ui/A'
910import Button from 'ui/Button'
1011import Icon from 'ui/Icon'
@@ -18,7 +19,7 @@ const emailSchema = z.object({
1819} )
1920
2021interface URLParams {
21- provider : string
22+ provider : Provider
2223 owner : string
2324}
2425
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { useParams } from 'react-router-dom'
33
44import { usePlanUpdatedNotification } from 'pages/PlanPage/context'
55import { useAccountDetails , usePlanData } from 'services/account'
6+ import { Provider } from 'shared/api/helpers'
67import { getScheduleStart } from 'shared/plan/ScheduledPlanDetails/ScheduledPlanDetails'
78import A from 'ui/A'
89import { Alert } from 'ui/Alert'
@@ -16,7 +17,7 @@ import LatestInvoiceCard from './LatestInvoiceCard'
1617import { EnterpriseAccountDetailsQueryOpts } from './queries/EnterpriseAccountDetailsQueryOpts'
1718
1819interface URLParams {
19- provider : string
20+ provider : Provider
2021 owner : string
2122}
2223
Original file line number Diff line number Diff line change 11import { useParams } from 'react-router-dom'
22
33import { useAccountDetails , usePlanData } from 'services/account'
4+ import { Provider } from 'shared/api/helpers'
45import { CollectionMethods } from 'shared/utils/billing'
56
67import EnterprisePlanCard from './EnterprisePlanCard'
78import FreePlanCard from './FreePlanCard'
89import PaidPlanCard from './PaidPlanCard'
910
1011interface URLParams {
11- provider : string
12+ provider : Provider
1213 owner : string
1314}
1415
Original file line number Diff line number Diff line change @@ -4,14 +4,15 @@ import { useParams } from 'react-router-dom'
44
55import { PlanPageDataQueryOpts } from 'pages/PlanPage/queries/PlanPageDataQueryOpts'
66import { useAccountDetails , usePlanData } from 'services/account'
7+ import { Provider } from 'shared/api/helpers'
78import BenefitList from 'shared/plan/BenefitList'
89import ScheduledPlanDetails from 'shared/plan/ScheduledPlanDetails'
910
1011import ActionsBilling from '../shared/ActionsBilling/ActionsBilling'
1112import PlanPricing from '../shared/PlanPricing'
1213
1314type URLParams = {
14- provider : string
15+ provider : Provider
1516 owner : string
1617}
1718
Original file line number Diff line number Diff line change 77 useAccountDetails ,
88 useAvailablePlans ,
99} from 'services/account'
10+ import { Provider } from 'shared/api/helpers'
1011import {
1112 BillingRate ,
1213 findProPlans ,
@@ -32,7 +33,7 @@ const PriceCallout: React.FC<PriceCalloutProps> = ({
3233 seats,
3334 setFormValue,
3435} ) => {
35- const { provider, owner } = useParams < { provider : string ; owner : string } > ( )
36+ const { provider, owner } = useParams < { provider : Provider ; owner : string } > ( )
3637 const { data : plans } = useAvailablePlans ( { provider, owner } )
3738 const { proPlanMonth, proPlanYear } = findProPlans ( { plans } )
3839 const perMonthPrice = calculatePriceProPlan ( {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import isNumber from 'lodash/isNumber'
22import { useParams } from 'react-router-dom'
33
44import { useAccountDetails } from 'services/account'
5+ import { Provider } from 'shared/api/helpers'
56
67interface StudentTextProps {
78 activatedStudents ?: number
@@ -41,7 +42,7 @@ const UserText: React.FC<UserTextProps> = ({
4142}
4243
4344const UserCount : React . FC = ( ) => {
44- const { provider, owner } = useParams < { provider : string ; owner : string } > ( )
45+ const { provider, owner } = useParams < { provider : Provider ; owner : string } > ( )
4546 const { data : accountDetails } = useAccountDetails ( { provider, owner } )
4647
4748 const activatedStudentCount = accountDetails ?. activatedStudentCount
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export * from './useInvoice'
88export * from './usePlanData'
99export * from './useAvailablePlans'
1010export * from './useSentryToken'
11+ export * from './useUpdateCard'
1112export * from './useUpdatePaymentMethod'
1213export * from './useUpgradePlan'
1314export * from './useUpdateBillingEmail'
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { useQuery } from '@tanstack/react-query'
22import { z } from 'zod'
33
44import Api from 'shared/api'
5- import { NetworkErrorObject } from 'shared/api/helpers'
5+ import { NetworkErrorObject , Provider } from 'shared/api/helpers'
66
77const InvoiceSchema = z
88 . object ( {
@@ -153,7 +153,7 @@ export const AccountDetailsSchema = z.object({
153153} )
154154
155155export interface UseAccountDetailsArgs {
156- provider : string
156+ provider : Provider
157157 owner : string
158158 opts ?: {
159159 enabled ?: boolean
@@ -164,7 +164,7 @@ function getPathAccountDetails({
164164 provider,
165165 owner,
166166} : {
167- provider : string
167+ provider : Provider
168168 owner : string
169169} ) {
170170 return `/${ provider } /${ owner } /account-details/`
You can’t perform that action at this time.
0 commit comments