Reformat code with Prettier's new rules.
This commit is contained in:
@@ -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,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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)}
|
||||
|
||||
@@ -93,7 +93,7 @@ const PlaylistsSubMenu = ({ state, setState, sidebarIsOpen, dense }) => {
|
||||
|
||||
const onPlaylistConfig = useCallback(
|
||||
() => history.push('/playlist'),
|
||||
[history]
|
||||
[history],
|
||||
)
|
||||
|
||||
return (
|
||||
|
||||
@@ -42,7 +42,7 @@ const useStyles = makeStyles(
|
||||
}),
|
||||
{
|
||||
name: 'NDSubMenu',
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const SubMenu = ({
|
||||
|
||||
@@ -118,7 +118,7 @@ const UserMenu = (props) => {
|
||||
? cloneElement(menuItem, {
|
||||
onClick: handleClose,
|
||||
})
|
||||
: null
|
||||
: null,
|
||||
)}
|
||||
{!config.auth && logout}
|
||||
</MenuList>
|
||||
|
||||
Reference in New Issue
Block a user