Reformat code with Prettier's new rules.
This commit is contained in:
@@ -11,7 +11,7 @@ const ArtistExternalLinks = ({ artistInfo, record }) => {
|
||||
const translate = useTranslate()
|
||||
let linkButtons = []
|
||||
const lastFMlink = artistInfo?.biography?.match(
|
||||
/<a\s+(?:[^>]*?\s+)?href=(["'])(.*?)\1/
|
||||
/<a\s+(?:[^>]*?\s+)?href=(["'])(.*?)\1/,
|
||||
)
|
||||
|
||||
const addLink = (url, title, icon) => {
|
||||
@@ -34,13 +34,13 @@ const ArtistExternalLinks = ({ artistInfo, record }) => {
|
||||
addLink(
|
||||
lastFMlink[2],
|
||||
'message.openIn.lastfm',
|
||||
<ImLastfm2 className="lastfm-icon" />
|
||||
<ImLastfm2 className="lastfm-icon" />,
|
||||
)
|
||||
} else if (artistInfo?.lastFmUrl) {
|
||||
addLink(
|
||||
artistInfo?.lastFmUrl,
|
||||
'message.openIn.lastfm',
|
||||
<ImLastfm2 className="lastfm-icon" />
|
||||
<ImLastfm2 className="lastfm-icon" />,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ const ArtistExternalLinks = ({ artistInfo, record }) => {
|
||||
addLink(
|
||||
`https://musicbrainz.org/artist/${artistInfo.musicBrainzId}`,
|
||||
'message.openIn.musicbrainz',
|
||||
<MusicBrainz className="musicbrainz-icon" />
|
||||
<MusicBrainz className="musicbrainz-icon" />,
|
||||
)
|
||||
|
||||
return <div>{intersperse(linkButtons, ' ')}</div>
|
||||
|
||||
@@ -90,7 +90,7 @@ const ArtistDatagridRow = (props) => {
|
||||
item: { artistIds: [record?.id] },
|
||||
options: { dropEffect: 'copy' },
|
||||
}),
|
||||
[record]
|
||||
[record],
|
||||
)
|
||||
return <DatagridRow ref={dragArtistRef} {...props} />
|
||||
}
|
||||
@@ -132,7 +132,7 @@ const ArtistListView = ({ hasShow, hasEdit, hasList, width, ...rest }) => {
|
||||
resource: 'artist',
|
||||
columns: toggleableFields,
|
||||
},
|
||||
['size']
|
||||
['size'],
|
||||
)
|
||||
|
||||
return isXsmall ? (
|
||||
|
||||
@@ -65,7 +65,7 @@ const useStyles = makeStyles(
|
||||
wordBreak: 'break-word',
|
||||
},
|
||||
}),
|
||||
{ name: 'NDDesktopArtistDetails' }
|
||||
{ name: 'NDDesktopArtistDetails' },
|
||||
)
|
||||
|
||||
const DesktopArtistDetails = ({ artistInfo, record, biography }) => {
|
||||
@@ -77,7 +77,7 @@ const DesktopArtistDetails = ({ artistInfo, record, biography }) => {
|
||||
const handleOpenLightbox = React.useCallback(() => setLightboxOpen(true), [])
|
||||
const handleCloseLightbox = React.useCallback(
|
||||
() => setLightboxOpen(false),
|
||||
[]
|
||||
[],
|
||||
)
|
||||
|
||||
return (
|
||||
|
||||
@@ -72,7 +72,7 @@ const useStyles = makeStyles(
|
||||
wordBreak: 'break-word',
|
||||
},
|
||||
}),
|
||||
{ name: 'NDMobileArtistDetails' }
|
||||
{ name: 'NDMobileArtistDetails' },
|
||||
)
|
||||
|
||||
const MobileArtistDetails = ({ artistInfo, biography, record }) => {
|
||||
@@ -85,7 +85,7 @@ const MobileArtistDetails = ({ artistInfo, biography, record }) => {
|
||||
const handleOpenLightbox = React.useCallback(() => setLightboxOpen(true), [])
|
||||
const handleCloseLightbox = React.useCallback(
|
||||
() => setLightboxOpen(false),
|
||||
[]
|
||||
[],
|
||||
)
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user