Reformat code with Prettier's new rules.

This commit is contained in:
Caio Cotts
2023-12-18 14:56:03 -05:00
parent 735d670a5b
commit 86757663d6
82 changed files with 236 additions and 222 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ const useStyles = makeStyles(
}),
{
name: 'NDAppBar',
}
},
)
const AboutMenuItem = forwardRef(({ onClick, ...rest }, ref) => {
@@ -90,7 +90,7 @@ const CustomUserMenu = ({ onClick, ...rest }) => {
}
return renderSettingsMenuItemLink(
userResource,
permissions !== 'admin' ? localStorage.getItem('userId') : null
permissions !== 'admin' ? localStorage.getItem('userId') : null,
)
}
+3 -3
View File
@@ -17,7 +17,7 @@ describe('<DynamicMenuIcon />', () => {
render(
<Router history={history}>
<DynamicMenuIcon icon={StarIcon} path={'test'} />
</Router>
</Router>,
)
expect(screen.getByTestId('icon')).not.toBeNull()
})
@@ -34,7 +34,7 @@ describe('<DynamicMenuIcon />', () => {
activeIcon={StarBorderIcon}
path={'otherpath'}
/>
</Router>
</Router>,
)
expect(screen.getByTestId('icon')).not.toBeNull()
})
@@ -51,7 +51,7 @@ describe('<DynamicMenuIcon />', () => {
activeIcon={StarBorderIcon}
path={'path'}
/>
</Router>
</Router>,
)
expect(screen.getByTestId('activeIcon')).not.toBeNull()
})
+9 -9
View File
@@ -82,7 +82,7 @@ const useStyles = makeStyles(
textDecoration: 'none',
},
}),
{ name: 'NDLogin' }
{ name: 'NDLogin' },
)
const renderInput = ({
@@ -263,14 +263,14 @@ const Login = ({ location }) => {
typeof error === 'string'
? error
: typeof error === 'undefined' || !error.message
? 'ra.auth.sign_in_error'
: error.message,
'warning'
? 'ra.auth.sign_in_error'
: error.message,
'warning',
)
}
},
)
},
[dispatch, login, notify, setLoading, location]
[dispatch, login, notify, setLoading, location],
)
const validateLogin = useCallback(
@@ -284,7 +284,7 @@ const Login = ({ location }) => {
}
return errors
},
[translate]
[translate],
)
const validateSignup = useCallback(
@@ -302,7 +302,7 @@ const Login = ({ location }) => {
}
return errors
},
[translate, validateLogin]
[translate, validateLogin],
)
if (config.firstTime) {
@@ -348,7 +348,7 @@ const LoginWithTheme = (props) => {
})
.catch((e) => {
throw new Error(
'Cannot load language "' + config.defaultLanguage + '": ' + e
'Cannot load language "' + config.defaultLanguage + '": ' + e,
)
})
}
+1 -1
View File
@@ -121,7 +121,7 @@ const Menu = ({ dense = false }) => {
dense={dense}
>
{Object.keys(albumLists).map((type) =>
renderAlbumMenuItemLink(type, albumLists[type])
renderAlbumMenuItemLink(type, albumLists[type]),
)}
</SubMenu>
{resources.filter(subItems(undefined)).map(renderResourceMenuItemLink)}
+1 -1
View File
@@ -93,7 +93,7 @@ const PlaylistsSubMenu = ({ state, setState, sidebarIsOpen, dense }) => {
const onPlaylistConfig = useCallback(
() => history.push('/playlist'),
[history]
[history],
)
return (
+1 -1
View File
@@ -42,7 +42,7 @@ const useStyles = makeStyles(
}),
{
name: 'NDSubMenu',
}
},
)
const SubMenu = ({
+1 -1
View File
@@ -118,7 +118,7 @@ const UserMenu = (props) => {
? cloneElement(menuItem, {
onClick: handleClose,
})
: null
: null,
)}
{!config.auth && logout}
</MenuList>