fix(ui): prevent duplicate getCoverArt requests on artist page

useMediaQuery defaults to false on the first render (SSR compat),
causing MobileArtistDetails to briefly render on desktop. Its CSS
background-image triggered a full-size image fetch before the
component switched to DesktopArtistDetails, which fetched again.

Pass noSsr: true so the media query evaluates synchronously, and
cap the mobile background image to 800px.
This commit is contained in:
Deluan
2026-03-14 20:36:57 -04:00
parent c63346de04
commit 549b812633
2 changed files with 4 additions and 2 deletions
+1 -1
View File
@@ -83,7 +83,7 @@ const useStyles = makeStyles(
)
const MobileArtistDetails = ({ artistInfo, biography, record }) => {
const img = subsonic.getCoverArtUrl(record)
const img = subsonic.getCoverArtUrl(record, 800)
const [expanded, setExpanded] = useState(false)
const classes = useStyles({ img, expanded })
const title = record.name