Fix imports and model field references in home components

Co-authored-by: zoriya <32224410+zoriya@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-19 17:00:54 +00:00
parent cc60dece54
commit e6859a1fff
3 changed files with 10 additions and 6 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ export const NewsList = () => {
kind={"movie"}
name={item.name!}
subtitle={getDisplayDate(item)}
poster={item.poster}
poster={item.kind === "movie" ? item.poster : null}
watchStatus={item.watchStatus?.status || null}
watchPercent={item.watchStatus?.percent || null}
unseenEpisodesCount={null}
+6 -2
View File
@@ -36,13 +36,17 @@ import {
PosterBackground,
Skeleton,
SubP,
focusReset,
imageBorderRadius,
tooltip,
ts,
} from "~/primitives";
import { InfiniteFetch, type Layout, type QueryIdentifier } from "~/query";
const imageBorderRadius = 6;
const focusReset = {
boxShadow: "unset",
outline: "none",
};
export const ItemDetails = ({
slug,
kind,
+3 -3
View File
@@ -58,12 +58,12 @@ export const WatchlistList = () => {
query={WatchlistList.query()}
layout={{ ...ItemGrid.layout, layout: "horizontal" }}
getItemType={(x, i) =>
(x?.kind === "serie" && x.watchStatus?.nextEntry) || (!x && i % 2) ? "episode" : "item"
(x?.kind === "serie" && x.nextEntry) || (!x && i % 2) ? "episode" : "item"
}
getItemSize={(kind) => (kind === "episode" ? 2 : 1)}
empty={t("home.none")}
Render={({ item }) => {
const entry = item.kind === "serie" ? item.watchStatus?.nextEntry : null;
const entry = item.kind === "serie" ? item.nextEntry : null;
if (entry) {
return (
<EntryBox
@@ -107,6 +107,6 @@ WatchlistList.query = (): QueryIdentifier<Show> => ({
params: {
// Limit the initial numbers of items
limit: 10,
fields: ["watchStatus"],
fields: ["watchStatus", "nextEntry"],
},
});