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