mirror of
https://github.com/anultravioletaurora/Jellify.git
synced 2026-04-27 09:01:38 -05:00
move item card to use expo image
This commit is contained in:
@@ -3,7 +3,9 @@ import type { CardProps as TamaguiCardProps } from "tamagui"
|
||||
import { getToken, Card as TamaguiCard, View } from "tamagui";
|
||||
import { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||
import { Text } from "../helpers/text";
|
||||
import BlurhashedImage from "./blurhashed-image";
|
||||
import { Image } from "expo-image";
|
||||
import { getImageApi } from "@jellyfin/sdk/lib/utils/api";
|
||||
import Client from "@/api/client";
|
||||
|
||||
interface CardProps extends TamaguiCardProps {
|
||||
caption?: string | null | undefined;
|
||||
@@ -48,11 +50,13 @@ export function ItemCard(props: CardProps) {
|
||||
)} */}
|
||||
</TamaguiCard.Footer>
|
||||
<TamaguiCard.Background>
|
||||
<BlurhashedImage
|
||||
item={props.item}
|
||||
width={dimensions.width}
|
||||
height={dimensions.height}
|
||||
borderRadius={props.squared ? 5 : dimensions.width}
|
||||
<Image
|
||||
source={getImageApi(Client.api!).getItemImageUrlById(props.item.Id!)}
|
||||
style={{
|
||||
width: dimensions.width,
|
||||
height: dimensions.height,
|
||||
borderRadius: props.squared ? 5 : dimensions.width
|
||||
}}
|
||||
/>
|
||||
</TamaguiCard.Background>
|
||||
</TamaguiCard>
|
||||
|
||||
Reference in New Issue
Block a user