Reformat code with Prettier's new rules.
This commit is contained in:
@@ -59,7 +59,7 @@ const PlaylistActions = ({ className, ids, data, record, ...rest }) => {
|
||||
.then((res) => {
|
||||
const data = res.data.reduce(
|
||||
(acc, curr) => ({ ...acc, [curr.id]: curr }),
|
||||
{}
|
||||
{},
|
||||
)
|
||||
dispatch(action(data))
|
||||
})
|
||||
@@ -67,7 +67,7 @@ const PlaylistActions = ({ className, ids, data, record, ...rest }) => {
|
||||
notify('ra.page.error', 'warning')
|
||||
})
|
||||
},
|
||||
[dataProvider, dispatch, record, data, ids, notify]
|
||||
[dataProvider, dispatch, record, data, ids, notify],
|
||||
)
|
||||
|
||||
const handlePlay = React.useCallback(() => {
|
||||
@@ -108,7 +108,7 @@ const PlaylistActions = ({ className, ids, data, record, ...rest }) => {
|
||||
link.click()
|
||||
link.parentNode.removeChild(link)
|
||||
}),
|
||||
[record]
|
||||
[record],
|
||||
)
|
||||
|
||||
return (
|
||||
|
||||
@@ -38,7 +38,7 @@ const useStyles = makeStyles(
|
||||
}),
|
||||
{
|
||||
name: 'NDPlaylistDetails',
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const PlaylistDetails = (props) => {
|
||||
|
||||
@@ -65,7 +65,7 @@ const TogglePublicInput = ({ resource, source }) => {
|
||||
console.log(error)
|
||||
notify('ra.page.error', 'warning')
|
||||
},
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const handleClick = (e) => {
|
||||
@@ -108,7 +108,7 @@ const PlaylistList = (props) => {
|
||||
),
|
||||
comment: <TextField source="comment" />,
|
||||
}),
|
||||
[isDesktop, isXsmall]
|
||||
[isDesktop, isXsmall],
|
||||
)
|
||||
|
||||
const columns = useSelectedFields({
|
||||
|
||||
@@ -20,7 +20,7 @@ const useStyles = makeStyles(
|
||||
}),
|
||||
{
|
||||
name: 'NDPlaylistShow',
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const PlaylistShowLayout = (props) => {
|
||||
|
||||
@@ -72,7 +72,7 @@ const useStyles = makeStyles(
|
||||
visibility: (props) => (props.isDesktop ? 'hidden' : 'visible'),
|
||||
},
|
||||
}),
|
||||
{ name: 'RaList' }
|
||||
{ name: 'RaList' },
|
||||
)
|
||||
|
||||
const ReorderableList = ({ readOnly, children, ...rest }) => {
|
||||
@@ -99,7 +99,7 @@ const PlaylistSongs = ({ playlistId, readOnly, actions, ...props }) => {
|
||||
refetch()
|
||||
}
|
||||
},
|
||||
[playlistId, refetch]
|
||||
[playlistId, refetch],
|
||||
)
|
||||
|
||||
const reorder = useCallback(
|
||||
@@ -117,7 +117,7 @@ const PlaylistSongs = ({ playlistId, readOnly, actions, ...props }) => {
|
||||
notify('ra.page.error', 'warning')
|
||||
})
|
||||
},
|
||||
[dataProvider, notify, refetch]
|
||||
[dataProvider, notify, refetch],
|
||||
)
|
||||
|
||||
const handleDragEnd = useCallback(
|
||||
@@ -126,7 +126,7 @@ const PlaylistSongs = ({ playlistId, readOnly, actions, ...props }) => {
|
||||
const fromId = ids[from]
|
||||
reorder(playlistId, fromId, toId)
|
||||
},
|
||||
[playlistId, reorder, ids]
|
||||
[playlistId, reorder, ids],
|
||||
)
|
||||
|
||||
const toggleableFields = useMemo(() => {
|
||||
|
||||
Reference in New Issue
Block a user