Refactor ItemsCrud.svelte to initialize searchQuery with an empty string and update it based on URL parameters using a reactive effect. Update receipt image handling in +page.svelte to define the image URL as a constant for improved readability.
This commit is contained in:
@@ -76,10 +76,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
{#if receipt.Image}
|
||||
{@const url = imageUrl(receipt)}
|
||||
<div class="flex gap-2">
|
||||
<dt class="text-muted-foreground w-24 shrink-0">Image</dt>
|
||||
<dd>
|
||||
{@const url = imageUrl(receipt)}
|
||||
{#if url}
|
||||
<img
|
||||
src={url}
|
||||
|
||||
Reference in New Issue
Block a user