diff --git a/sitio/src/lib/ProductPreview.svelte b/sitio/src/lib/ProductPreview.svelte index cf377b9..17fa6cc 100644 --- a/sitio/src/lib/ProductPreview.svelte +++ b/sitio/src/lib/ProductPreview.svelte @@ -1,8 +1,10 @@ - {product.name} + {#if product.imageUrl} + {product.name} + {/if}

{product.name}

diff --git a/sitio/src/routes/+page.svelte b/sitio/src/routes/+page.svelte index 349bd3b..e16cb94 100644 --- a/sitio/src/routes/+page.svelte +++ b/sitio/src/routes/+page.svelte @@ -3,6 +3,10 @@ import type { PageData } from "./$types"; export let data: PageData; + $: precios = data.precios.filter( + (d): d is { ean: string; name: string; imageUrl: string | null } => + !!d.name, + );

WIP

@@ -32,7 +36,7 @@

Random