From ebad8f32a40853df58df5f63d95e081bbd99bf1b Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sun, 26 Oct 2025 22:31:24 +0100 Subject: [PATCH] Fix details page query --- front/src/ui/details/header.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/front/src/ui/details/header.tsx b/front/src/ui/details/header.tsx index ea68f5ca..04610a5c 100644 --- a/front/src/ui/details/header.tsx +++ b/front/src/ui/details/header.tsx @@ -25,9 +25,11 @@ import { import { WatchListInfo } from "~/components/items/watchlist-info"; import { Rating } from "~/components/rating"; import { + Collection, type Genre, type KImage, - Show, + Movie, + Serie, type Studio, type WatchStatusV, } from "~/models"; @@ -827,8 +829,8 @@ export const Header = ({ Header.query = ( kind: "serie" | "movie" | "collection", slug: string, -): QueryIdentifier => ({ - parser: Show, +): QueryIdentifier => ({ + parser: kind === "serie" ? Serie : kind === "movie" ? Movie : Collection, path: ["api", `${kind}s`, slug], params: { with: ["studios", ...(kind === "serie" ? ["firstEntry", "nextEntry"] : [])],