fix: add option for height

This commit is contained in:
Fredrik Burmester
2024-08-21 20:21:21 +02:00
parent a37ac74e9f
commit 9a621cab4e

View File

@@ -9,10 +9,12 @@ import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl";
type ContinueWatchingPosterProps = {
item: BaseItemDto;
width?: number;
};
const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
item,
width = 176,
}) => {
const [api] = useAtom(apiAtom);
@@ -33,11 +35,21 @@ const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
if (!url)
return (
<View className="w-44 aspect-video border border-neutral-800"></View>
<View
className="aspect-video border border-neutral-800"
style={{
width,
}}
></View>
);
return (
<View className="w-44 relative aspect-video rounded-lg overflow-hidden border border-neutral-800">
<View
style={{
width,
}}
className="relative aspect-video rounded-lg overflow-hidden border border-neutral-800"
>
<Image
key={item.Id}
id={item.Id}