Skip to content

Commit

Permalink
revert(MetaDetails): renderbg logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kKaskak committed Dec 26, 2024
1 parent 97ed4b5 commit dc00a9f
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/routes/MetaDetails/MetaDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,12 @@ const MetaDetails = ({ urlParams, queryParams }) => {
setSeason(event.value);
}, [setSeason]);
const renderBackgroundImageFallback = React.useCallback(() => null, []);
const renderBackground = React.useMemo(() => !!(
metaPath &&
metaDetails?.metaItem &&
metaDetails.metaItem.content?.type !== 'Err' &&
metaDetails.metaItem.content.type !== 'Loading' &&
typeof metaDetails.metaItem.content.content?.background === 'string' &&
metaDetails.metaItem.content.content.background.length > 0
), [metaPath, metaDetails]);

return (
<div className={styles['metadetails-container']}>
{
renderBackground ?
typeof metaDetails.metaItem.content.content.background === 'string'
&& metaDetails.metaItem.content.content.background.length > 0 ?
<div className={styles['background-image-layer']}>
<Image
className={styles['background-image']}
Expand Down

0 comments on commit dc00a9f

Please sign in to comment.