1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Uses an Image component to display the logo image

This commit is contained in:
grafixeyehero 2024-03-09 03:52:17 +03:00
parent e8422e2c29
commit 8197e012a7

View file

@ -5,6 +5,7 @@ import layoutManager from 'components/layoutManager';
import MoreVertIconButton from '../../common/MoreVertIconButton'; import MoreVertIconButton from '../../common/MoreVertIconButton';
import type { ItemDto } from 'types/base/models/item-dto'; import type { ItemDto } from 'types/base/models/item-dto';
import type { CardOptions } from 'types/cardOptions'; import type { CardOptions } from 'types/cardOptions';
import Image from 'components/common/Image';
const shouldShowDetailsMenu = ( const shouldShowDetailsMenu = (
cardOptions: CardOptions, cardOptions: CardOptions,
@ -23,9 +24,14 @@ interface LogoComponentProps {
logoUrl: string; logoUrl: string;
} }
const LogoComponent: FC<LogoComponentProps> = ({ logoUrl }) => { const LogoComponent: FC<LogoComponentProps> = ({ logoUrl }) => (
return <Box className='lazy cardFooterLogo' data-src={logoUrl} />; <Box className='cardFooterLogo'>
}; <Image
imgUrl={logoUrl}
containImage={true}
/>
</Box>
);
interface CardFooterTextProps { interface CardFooterTextProps {
item: ItemDto; item: ItemDto;
@ -51,7 +57,7 @@ const CardFooterText: FC<CardFooterTextProps> = ({
isOuterFooter isOuterFooter
}) => { }) => {
const { cardTextLines } = useCardText({ const { cardTextLines } = useCardText({
item, item: item.ProgramInfo || item,
cardOptions, cardOptions,
forceName, forceName,
imgUrl, imgUrl,