Skip to content

Commit 10f68a2

Browse files
[docs] Fix licensingModel -> licenseModel
1 parent 026bdcb commit 10f68a2

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

docs/pages/pricing.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import HeroEnd from 'docs/src/components/home/HeroEnd';
1313
import AppFooter from 'docs/src/layouts/AppFooter';
1414
import BrandingCssVarsProvider from 'docs/src/BrandingCssVarsProvider';
1515
import AppHeaderBanner from 'docs/src/components/banner/AppHeaderBanner';
16-
import { LicensingModelProvider } from 'docs/src/components/pricing/LicensingModelContext';
16+
import { LicenseModelProvider } from 'docs/src/components/pricing/LicenseModelContext';
1717

1818
export default function Pricing() {
1919
return (
@@ -28,7 +28,7 @@ export default function Pricing() {
2828
<main id="main-content">
2929
<HeroPricing />
3030
<Divider />
31-
<LicensingModelProvider>
31+
<LicenseModelProvider>
3232
{/* Mobile, Tablet */}
3333
<Container sx={{ display: { xs: 'block', md: 'none' }, pb: 3, mt: '-1px' }}>
3434
<PricingList />
@@ -37,7 +37,7 @@ export default function Pricing() {
3737
<Container sx={{ display: { xs: 'none', md: 'block' } }}>
3838
<PricingTable />
3939
</Container>
40-
</LicensingModelProvider>
40+
</LicenseModelProvider>
4141
<PricingWhatToExpect />
4242
<Divider />
4343
<PricingFAQ />

docs/src/components/pricing/LicensingModelContext.tsx renamed to docs/src/components/pricing/LicenseModelContext.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ if (process.env.NODE_ENV !== 'production') {
66
LicenseModel.displayName = 'LicenseModel';
77
}
88

9-
export function LicensingModelProvider(props: any) {
10-
const [licensingModel, setLicensingModel] = React.useState<string>('annual');
9+
export function LicenseModelProvider(props: any) {
10+
const [licenseModel, setLicenseModel] = React.useState<string>('annual');
1111
const value = React.useMemo(
12-
() => ({ licensingModel, setLicensingModel }),
13-
[licensingModel, setLicensingModel],
12+
() => ({ licenseModel, setLicenseModel }),
13+
[licenseModel, setLicenseModel],
1414
);
1515
return <LicenseModel.Provider value={value}>{props.children}</LicenseModel.Provider>;
1616
}
1717

18-
export function useLicensingModel() {
18+
export function useLicenseModel() {
1919
return React.useContext(LicenseModel);
2020
}

docs/src/components/pricing/LicensingModelSwitch.tsx renamed to docs/src/components/pricing/LicenseModelSwitch.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Box from '@mui/material/Box';
44
import Tooltip from '@mui/material/Tooltip';
55
import Tabs from '@mui/material/Tabs';
66
import Tab from '@mui/material/Tab';
7-
import { useLicensingModel } from 'docs/src/components/pricing/LicensingModelContext';
7+
import { useLicenseModel } from 'docs/src/components/pricing/LicenseModelContext';
88

99
const StyledTabs = styled(Tabs)(({ theme }) => ({
1010
margin: '14px auto 4px',
@@ -94,19 +94,19 @@ const tooltipProps = {
9494
},
9595
};
9696

97-
export default function LicensingModelSwitch() {
98-
const { licensingModel, setLicensingModel } = useLicensingModel();
97+
export default function LicenseModelSwitch() {
98+
const { licenseModel, setLicenseModel } = useLicenseModel();
9999

100100
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
101-
setLicensingModel(newValue);
101+
setLicenseModel(newValue);
102102
};
103103

104104
return (
105105
<Box sx={{ display: 'flex' }}>
106106
<StyledTabs
107-
aria-label="licensing model"
107+
aria-label="license model"
108108
selectionFollowsFocus
109-
value={licensingModel}
109+
value={licenseModel}
110110
onChange={handleChange}
111111
>
112112
<Tab

docs/src/components/pricing/PricingList.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Tab from '@mui/material/Tab';
1010
import KeyboardArrowRightRounded from '@mui/icons-material/KeyboardArrowRightRounded';
1111
import { Link } from '@mui/docs/Link';
1212
import PricingTable, { PlanName, PlanPrice } from 'docs/src/components/pricing/PricingTable';
13-
import { useLicensingModel } from 'docs/src/components/pricing/LicensingModelContext';
13+
import { useLicenseModel } from 'docs/src/components/pricing/LicenseModelContext';
1414

1515
const Plan = React.forwardRef<
1616
HTMLDivElement,
@@ -22,7 +22,7 @@ const Plan = React.forwardRef<
2222
>(function Plan({ plan, benefits, unavailable, sx, ...props }, ref) {
2323
const globalTheme = useTheme();
2424
const mode = globalTheme.palette.mode;
25-
const { licensingModel } = useLicensingModel();
25+
const { licenseModel } = useLicenseModel();
2626

2727
return (
2828
<Paper
@@ -54,11 +54,11 @@ const Plan = React.forwardRef<
5454
{
5555
community: '/material-ui/getting-started/usage/',
5656
pro:
57-
licensingModel === 'annual'
57+
licenseModel === 'annual'
5858
? 'https://mui.com/store/items/mui-x-pro/'
5959
: 'https://mui.com/store/items/mui-x-pro-perpetual/',
6060
premium:
61-
licensingModel === 'annual'
61+
licenseModel === 'annual'
6262
? 'https://mui.com/store/items/mui-x-premium/'
6363
: 'https://mui.com/store/items/mui-x-premium-perpetual/',
6464
}[plan]

docs/src/components/pricing/PricingTable.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import LaunchRounded from '@mui/icons-material/LaunchRounded';
1515
import UnfoldMoreRounded from '@mui/icons-material/UnfoldMoreRounded';
1616
import { Link } from '@mui/docs/Link';
1717
import IconImage from 'docs/src/components/icon/IconImage';
18-
import LicensingModelSwitch from 'docs/src/components/pricing/LicensingModelSwitch';
19-
import { useLicensingModel } from 'docs/src/components/pricing/LicensingModelContext';
18+
import LicenseModelSwitch from 'docs/src/components/pricing/LicenseModelSwitch';
19+
import { useLicenseModel } from 'docs/src/components/pricing/LicenseModelContext';
2020

2121
const planInfo = {
2222
community: {
@@ -92,8 +92,8 @@ interface PlanPriceProps {
9292
export function PlanPrice(props: PlanPriceProps) {
9393
const { plan } = props;
9494

95-
const { licensingModel } = useLicensingModel();
96-
const annual = licensingModel === 'annual';
95+
const { licenseModel } = useLicenseModel();
96+
const annual = licenseModel === 'annual';
9797
const planPriceMinHeight = 64;
9898

9999
if (plan === 'community') {
@@ -136,7 +136,7 @@ export function PlanPrice(props: PlanPriceProps) {
136136

137137
return (
138138
<React.Fragment>
139-
<LicensingModelSwitch />
139+
<LicenseModelSwitch />
140140
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', mt: 1, mb: 4 }}>
141141
<Typography
142142
variant="h3"
@@ -198,7 +198,7 @@ export function PlanPrice(props: PlanPriceProps) {
198198

199199
return (
200200
<React.Fragment>
201-
<LicensingModelSwitch />
201+
<LicenseModelSwitch />
202202
<Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', mt: 1, mb: 4 }}>
203203
<Typography
204204
variant="caption"
@@ -1196,22 +1196,22 @@ function renderMasterRow(key: string, gridSx: object, plans: Array<any>) {
11961196

11971197
function PricingTableDevelopment(props: any) {
11981198
const { renderRow } = props;
1199-
const { licensingModel } = useLicensingModel();
1199+
const { licenseModel } = useLicenseModel();
12001200

1201-
return licensingModel === 'annual'
1201+
return licenseModel === 'annual'
12021202
? renderRow('mui-x-development')
12031203
: renderRow('mui-x-development-perpetual');
12041204
}
12051205

12061206
function PricingTableBuyPro() {
1207-
const { licensingModel } = useLicensingModel();
1207+
const { licenseModel } = useLicenseModel();
12081208

12091209
return (
12101210
<Button
12111211
component={Link}
12121212
noLinkStyle
12131213
href={
1214-
licensingModel === 'annual'
1214+
licenseModel === 'annual'
12151215
? 'https://mui.com/store/items/mui-x-pro/'
12161216
: 'https://mui.com/store/items/mui-x-pro-perpetual/'
12171217
}
@@ -1225,14 +1225,14 @@ function PricingTableBuyPro() {
12251225
}
12261226

12271227
function PricingTableBuyPremium() {
1228-
const { licensingModel } = useLicensingModel();
1228+
const { licenseModel } = useLicenseModel();
12291229

12301230
return (
12311231
<Button
12321232
component={Link}
12331233
noLinkStyle
12341234
href={
1235-
licensingModel === 'annual'
1235+
licenseModel === 'annual'
12361236
? 'https://mui.com/store/items/mui-x-premium/'
12371237
: 'https://mui.com/store/items/mui-x-premium-perpetual/'
12381238
}

0 commit comments

Comments
 (0)