mirror of
https://github.com/Readarr/Readarr
synced 2025-12-27 02:32:27 +01:00
Fixed: Invalid image URL if Author/Book is missing background image
(cherry picked from commit dd096e0fda71b3afa9b09c2900abbf226d8a5204) Closes #2625
This commit is contained in:
parent
1ebdffcd26
commit
07451cbcde
2 changed files with 12 additions and 6 deletions
|
|
@ -92,6 +92,7 @@ class AuthorDetailsHeader extends Component {
|
|||
titleWidth
|
||||
} = this.state;
|
||||
|
||||
const fanartUrl = getFanartUrl(images);
|
||||
const marqueeWidth = titleWidth - (isSmallScreen ? 85 : 160);
|
||||
|
||||
const continuing = status === 'continuing';
|
||||
|
|
@ -108,9 +109,11 @@ class AuthorDetailsHeader extends Component {
|
|||
<div className={styles.header} style={{ width }} >
|
||||
<div
|
||||
className={styles.backdrop}
|
||||
style={{
|
||||
backgroundImage: `url(${getFanartUrl(images)})`
|
||||
}}
|
||||
style={
|
||||
fanartUrl ?
|
||||
{ backgroundImage: `url(${fanartUrl})` } :
|
||||
null
|
||||
}
|
||||
>
|
||||
<div className={styles.backdropOverlay} />
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -83,15 +83,18 @@ class BookDetailsHeader extends Component {
|
|||
titleWidth
|
||||
} = this.state;
|
||||
|
||||
const fanartUrl = getFanartUrl(author.images);
|
||||
const marqueeWidth = titleWidth - (isSmallScreen ? 85 : 160);
|
||||
|
||||
return (
|
||||
<div className={styles.header} style={{ width }}>
|
||||
<div
|
||||
className={styles.backdrop}
|
||||
style={{
|
||||
backgroundImage: `url(${getFanartUrl(author.images)})`
|
||||
}}
|
||||
style={
|
||||
fanartUrl ?
|
||||
{ backgroundImage: `url(${fanartUrl})` } :
|
||||
null
|
||||
}
|
||||
>
|
||||
<div className={styles.backdropOverlay} />
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in a new issue