Skip to content

Commit

Permalink
Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongarciah committed Jul 9, 2024
1 parent cac0ea7 commit e53a49a
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion docs/src/modules/components/AppLayoutDocsFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function orderedPages(pages, current = []) {
}

async function postFeedback(data) {
const env = window.location.host.includes('mui.com')? 'prod' : 'dev';
const env = window.location.host.includes('mui.com') ? 'prod' : 'dev';
try {
const response = await fetch(`${process.env.FEEDBACK_URL}/${env}/feedback`, {
method: 'POST',
Expand Down
5 changes: 3 additions & 2 deletions docs/src/modules/components/AppNavDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,9 @@ function reduceChildRoutes(context) {

const title = pageToTitleI18n(page, t);
if (page.children && page.children.length >= 1) {
const topLevel =
activePageParents.map((parentPage) => parentPage.pathname).includes(page.pathname);
const topLevel = activePageParents
.map((parentPage) => parentPage.pathname)
.includes(page.pathname);

let firstChild = page.children[0];

Expand Down
5 changes: 3 additions & 2 deletions docs/src/modules/components/AppSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,9 @@ export default function AppSearch(props) {
const searchButtonRef = React.useRef(null);
const [isOpen, setIsOpen] = React.useState(false);
const [initialQuery, setInitialQuery] = React.useState(undefined);
const facetFilterLanguage =
LANGUAGES_SSR.includes(userLanguage)? `language:${userLanguage}` : `language:en`;
const facetFilterLanguage = LANGUAGES_SSR.includes(userLanguage)
? `language:${userLanguage}`
: `language:en`;
const macOS = window.navigator.platform.toUpperCase().indexOf('MAC') >= 0;
const onOpen = React.useCallback(() => {
setIsOpen(true);
Expand Down
6 changes: 1 addition & 5 deletions docs/src/modules/utils/find.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ export function findPages(
return;
}

if (
options.front &&
!pathname.includes('/components')&&
!pathname.includes('/api-docs')
) {
if (options.front && !pathname.includes('/components') && !pathname.includes('/api-docs')) {
return;
}

Expand Down
3 changes: 1 addition & 2 deletions docs/src/pages/versions/ReleasedVersions.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ function ReleasedVersions() {
</Link>
</TableCell>
<TableCell>
{doc.version.length >= 6 &&
!doc.version.includes('pre-release') ? (
{doc.version.length >= 6 && !doc.version.includes('pre-release') ? (
<Link
variant="body2"
rel="nofollow"
Expand Down
5 changes: 1 addition & 4 deletions packages/mui-joy/src/styles/styleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ export const resolveSxValue = <K extends string>(
} else {
sxObject[key] = theme.vars?.radius[value as keyof typeof theme.vars.radius] || value;
}
} else if (
['p', 'padding', 'm', 'margin'].includes(key) &&
typeof value === 'number'
) {
} else if (['p', 'padding', 'm', 'margin'].includes(key) && typeof value === 'number') {
sxObject[key] = theme.spacing(value);
} else {
sxObject[key] = value;
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material/src/usePagination/usePagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export default function usePagination(props = {}) {
selected: false,
disabled:
disabled ||
(!item.includes('ellipsis')&&
(!item.includes('ellipsis') &&
(item === 'next' || item === 'last' ? page >= count : page <= 1)),
};
});
Expand Down

0 comments on commit e53a49a

Please sign in to comment.