@@ -102,7 +117,7 @@
id="title"
name="title"
required
- value={item.title}
+ value={item?.title || ''}
placeholder="e.g., Blue Headphones"
/>
@@ -112,7 +127,7 @@
@@ -154,7 +169,7 @@
name="price"
type="number"
step="0.01"
- value={item.price || ''}
+ value={item?.price || ''}
placeholder="0.00"
/>
@@ -167,7 +182,9 @@
class="flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm"
>
{#each currencies as curr (curr)}
-
-
-
{
- const newPos = parseInt((e.target as HTMLInputElement).value);
- if (newPos >= 1 && newPos <= totalItems) {
- onPositionChange?.(newPos);
- }
- }}
- placeholder="1"
- />
-
- Choose where this item appears in your wishlist (1 = top, {totalItems} = bottom)
-
-
+ {#if isEdit}
+
+
+
{
+ const newPos = parseInt((e.target as HTMLInputElement).value);
+ if (newPos >= 1 && newPos <= totalItems) {
+ onPositionChange?.(newPos);
+ }
+ }}
+ placeholder="1"
+ />
+
+ Choose where this item appears in your wishlist (1 = top, {totalItems} = bottom)
+
+
+ {/if}