mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-06 04:22:51 +01:00
fix: add option for height
This commit is contained in:
@@ -9,10 +9,12 @@ import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl";
|
|||||||
|
|
||||||
type ContinueWatchingPosterProps = {
|
type ContinueWatchingPosterProps = {
|
||||||
item: BaseItemDto;
|
item: BaseItemDto;
|
||||||
|
width?: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
|
const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
|
||||||
item,
|
item,
|
||||||
|
width = 176,
|
||||||
}) => {
|
}) => {
|
||||||
const [api] = useAtom(apiAtom);
|
const [api] = useAtom(apiAtom);
|
||||||
|
|
||||||
@@ -33,11 +35,21 @@ const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
|
|||||||
|
|
||||||
if (!url)
|
if (!url)
|
||||||
return (
|
return (
|
||||||
<View className="w-44 aspect-video border border-neutral-800"></View>
|
<View
|
||||||
|
className="aspect-video border border-neutral-800"
|
||||||
|
style={{
|
||||||
|
width,
|
||||||
|
}}
|
||||||
|
></View>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
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
|
<Image
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
id={item.Id}
|
id={item.Id}
|
||||||
|
|||||||
Reference in New Issue
Block a user