diff --git a/pruebas/02-bazar-universal/dano2906/src/assets/placeholder-product-image.png b/pruebas/02-bazar-universal/dano2906/src/assets/placeholder-product-image.png deleted file mode 100644 index 58ca12eae..000000000 Binary files a/pruebas/02-bazar-universal/dano2906/src/assets/placeholder-product-image.png and /dev/null differ diff --git a/pruebas/02-bazar-universal/dano2906/src/components/Navigation.astro b/pruebas/02-bazar-universal/dano2906/src/components/Navigation.astro index 60029df2d..09d230f77 100644 --- a/pruebas/02-bazar-universal/dano2906/src/components/Navigation.astro +++ b/pruebas/02-bazar-universal/dano2906/src/components/Navigation.astro @@ -1,5 +1,5 @@
\ No newline at end of file diff --git a/pruebas/02-bazar-universal/dano2906/src/pages/index.astro b/pruebas/02-bazar-universal/dano2906/src/pages/index.astro index dec60423c..d1d507be8 100644 --- a/pruebas/02-bazar-universal/dano2906/src/pages/index.astro +++ b/pruebas/02-bazar-universal/dano2906/src/pages/index.astro @@ -1,7 +1,7 @@ --- import MainLayout from "@layouts/MainLayout.astro"; import { Image } from "astro:assets"; -import shopImg from "@assets/shopImg.svg" +import shopImg from "../../public/shopImg.svg" import SearchForm from "@components/SearchForm.astro"; --- diff --git a/pruebas/02-bazar-universal/dano2906/src/pages/items/[id]/index.astro b/pruebas/02-bazar-universal/dano2906/src/pages/items/[id]/index.astro index 85ae5afe4..713f18db9 100644 --- a/pruebas/02-bazar-universal/dano2906/src/pages/items/[id]/index.astro +++ b/pruebas/02-bazar-universal/dano2906/src/pages/items/[id]/index.astro @@ -1,8 +1,19 @@ --- import MainLayout from "@layouts/MainLayout.astro"; - const {id} = Astro.params +import { Image } from "astro:assets"; +import productImage from "../../../../public/placeholder-product-image.png" +const {id} = Astro.params +const res = await fetch(Astro.url.origin + `/api/items/${id}/data.json`) +const {product} = await res.json() +const {title,description,price,category,rating} = product + --- -

{id}

+ {title} +

{title}

+

{description}

+ {category} + Price: ${price} + Rating: {rating}/5
\ No newline at end of file diff --git a/pruebas/02-bazar-universal/dano2906/src/pages/items/index.astro b/pruebas/02-bazar-universal/dano2906/src/pages/items/index.astro index 9b21883b2..75a7460c4 100644 --- a/pruebas/02-bazar-universal/dano2906/src/pages/items/index.astro +++ b/pruebas/02-bazar-universal/dano2906/src/pages/items/index.astro @@ -1,10 +1,11 @@ --- +export const prerrender = false; import ProductsResultSection from "@components/ProductsResultSection.astro"; import SearchForm from "@components/SearchForm.astro"; import MainLayout from "@layouts/MainLayout.astro"; --- -
+