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
+4 -4
View File
@@ -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>
+2 -2
View File
@@ -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 ? (
+2 -2
View File
@@ -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 (
+2 -2
View File
@@ -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 (