mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-01 19:26:40 +00:00
Fix imports and model field references in home components
Co-authored-by: zoriya <32224410+zoriya@users.noreply.github.com>
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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"],
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user