Skip to content

Commit

Permalink
few more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mnajdova authored and brijeshb42 committed Jun 6, 2023
1 parent 913da62 commit 6f900cf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/pages/blog/introducing-mui-base.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tags: ['News', 'MUI Core']
card: true
---

<a href="/base/getting-started/overview/"><img src="/static/blog/introducing-mui-base/hero-image.png" style="width: 692px; aspect-ratio: 132/61; margin-bottom: 24px;" alt="Demo components built with Base UI, a newly introduced library of unstyled components and hooks" /></a>
<a href="/base-ui/getting-started/overview/"><img src="/static/blog/introducing-mui-base/hero-image.png" style="width: 692px; aspect-ratio: 132/61; margin-bottom: 24px;" alt="Demo components built with Base UI, a newly introduced library of unstyled components and hooks" /></a>

While Material UI is excellent for building sleek user interfaces that adhere closely to Material Design, it can become unwieldy when your design system diverges significantly from the defaults.
We get it.
Expand Down
5 changes: 5 additions & 0 deletions docs/src/modules/utils/getUrlProduct.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ describe('getUrlProduct', () => {
expect(getUrlProduct('/zh/base/react-button/')).to.equal('base');
});

it('get base', () => {
expect(getUrlProduct('/base-ui/react-button/')).to.equal('base');
expect(getUrlProduct('/zh/base-ui/react-button/')).to.equal('base');
});

it('get joy-ui', () => {
expect(getUrlProduct('/joy-ui/react-button/')).to.equal('joy-ui');
expect(getUrlProduct('/zh/joy-ui/react-button/')).to.equal('joy-ui');
Expand Down
2 changes: 1 addition & 1 deletion docs/src/modules/utils/getUrlProduct.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ export default function getUrlProduct(asPath: string) {
if (urlWithoutLang.startsWith('/x')) {
return urlWithoutLang.replace('/x/react-', '').replace(/\/.*/, '');
}
return urlWithoutLang.replace(/^\/([^/]+)\/.*/, '$1');
return urlWithoutLang.replace('base-ui', 'base').replace(/^\/([^/]+)\/.*/, '$1');
}

0 comments on commit 6f900cf

Please sign in to comment.