Skip to content

Commit

Permalink
Merge pull request #44 from bob2402/each-key
Browse files Browse the repository at this point in the history
problem: sometimes the content of the card does not match the title
  • Loading branch information
gsovereignty authored Jul 26, 2024
2 parents a91f847 + c3eb690 commit 3f90852
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/ProductFomo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<Card.Description></Card.Description>
</Card.Header>
<Card.Content class="grid grid-cols-1 gap-2">
{#each $products as product}
{#each $products as product (product.ID)}
<div>
<ProductCardFromId {rocket} productID={product.ID}>
<ProductPurchases {rocket} {product} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/ProductsForRocket.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</script>

{#if rocketEvent && rocketProducts.size > 0}
{#each rocketProducts as [id, product]}
{#each rocketProducts as [id, product] (id)}
<ProductCardFromID rocket={rocketEvent} productID={product.ID} />
<ProductPurchases rocket={rocketEvent} {product} />{/each}
{/if}
2 changes: 1 addition & 1 deletion src/components/ProposedProducts.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
});
</script>

{#each $unratified as r}<ProductCard {rocket} product={r} />{/each}
{#each $unratified as r (r.id)}<ProductCard {rocket} product={r} />{/each}
4 changes: 2 additions & 2 deletions src/routes/products/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
</script>

{#if productsToRender && $productsToRender}
{#each $productsToRender as [r, p]}
{#each $productsToRender as [r, p] (r.id)}
<Heading title={r.dTag} />
<div class="grid gap-2" style="grid-template-columns: repeat(auto-fit, 350px);">
{#each p as product}
{#each p as product (product.id)}
<ProductCard {product} rocket={r} />
{/each}
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/views/rockets/Rockets.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{#if entries && $entries}
<Todo text={['render these in a nicer way, maybe a grid or something']} />

{#each $entries as rocketEvent}
{#each $entries as rocketEvent (rocketEvent.id)}
<RocketCard {rocketEvent} />
{/each}
{/if}

0 comments on commit 3f90852

Please sign in to comment.