From a43a77d1585062bc2528b6418eaad4a388fb80d9 Mon Sep 17 00:00:00 2001 From: qpismont Date: Thu, 25 Jul 2024 22:07:32 +0200 Subject: [PATCH] fix movie detail page --- src/pages/home/movies/[id].astro | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/pages/home/movies/[id].astro b/src/pages/home/movies/[id].astro index 5a54344..c653df5 100644 --- a/src/pages/home/movies/[id].astro +++ b/src/pages/home/movies/[id].astro @@ -1,7 +1,6 @@ --- -import { FaEye } from "react-icons/fa"; import HomeLayout from "../../../layouts/HomeLayout.astro"; -import type { Movie } from "../../../types"; +import type { Movie, MovieDetail } from "../../../types"; const jwt = Astro.cookies.get("jwt")?.value as string; const { id } = Astro.params; @@ -14,17 +13,17 @@ const res = await fetch(`${import.meta.env.API_URL}/movies/${id}`, { }, }); -const movie = (await res.json()).movie as Movie; +const item = (await res.json()).movie as MovieDetail; --- - + <> -

{movie.title}

+

{item.movie.title}