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:
parent
e8422e2c29
commit
8197e012a7
1 changed files with 10 additions and 4 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue