diff --git a/src/lib/components/PokemonSprite.svelte b/src/lib/components/PokemonSprite.svelte
index aa29c91..4b0602b 100644
--- a/src/lib/components/PokemonSprite.svelte
+++ b/src/lib/components/PokemonSprite.svelte
@@ -59,10 +59,6 @@
break;
}
- // if (strippedPokedexNumber == '869') {
- // console.log(sanitisedPokemonName, sanitisedForm);
- // }
-
// If the form is contained in the identifier, use that
if (
pokeApiPokemon.find(
diff --git a/src/lib/components/pokedex/PokedexEntryCatchRecord.svelte b/src/lib/components/pokedex/PokedexEntryCatchRecord.svelte
index 39f28b3..6020e75 100644
--- a/src/lib/components/pokedex/PokedexEntryCatchRecord.svelte
+++ b/src/lib/components/pokedex/PokedexEntryCatchRecord.svelte
@@ -10,22 +10,24 @@
export let showForms: boolean;
export let showShiny: boolean;
- // Create a working copy for editing
- $: workingCatchRecord = catchRecord || {
- _id: `temp-${Date.now()}-${pokedexEntry._id}`, // Generate temporary ID
- userId: '', // TODO: Get from session context
- pokedexEntryId: pokedexEntry._id,
- haveToEvolve: false,
- caught: false,
- inHome: false,
- hasGigantamaxed: false,
- personalNotes: ''
- };
+ // Create a default catch record if none exists
+ $: if (!catchRecord) {
+ catchRecord = {
+ _id: '', // Empty string, not temp ID - will be created by server
+ userId: '',
+ pokedexEntryId: pokedexEntry._id,
+ haveToEvolve: false,
+ caught: false,
+ inHome: false,
+ hasGigantamaxed: false,
+ personalNotes: ''
+ };
+ }
const dispatch = createEventDispatcher();
function updateCatchRecord() {
- dispatch('updateCatch', { pokedexEntry, catchRecord: workingCatchRecord });
+ dispatch('updateCatch', { pokedexEntry, catchRecord });
}
@@ -87,7 +89,7 @@
Caught:
@@ -100,7 +102,7 @@
Needs to evolve:
@@ -113,7 +115,7 @@
In home:
@@ -127,7 +129,7 @@
Has Gigantamaxed:
@@ -141,7 +143,7 @@
for={`personalNotesInput-${catchRecord?._id || pokedexEntry._id}`}>Notes: