fix(*): Pass userId prop to PokedexEntryCatchRecord component

This commit is contained in:
Josh Creek
2025-07-26 22:07:06 +01:00
parent 389f73d164
commit ebfe2413f0
2 changed files with 3 additions and 1 deletions
@@ -9,12 +9,13 @@
export let showOrigins: boolean; export let showOrigins: boolean;
export let showForms: boolean; export let showForms: boolean;
export let showShiny: boolean; export let showShiny: boolean;
export let userId: string | null = null;
// Create a default catch record if none exists // Create a default catch record if none exists
$: if (!catchRecord) { $: if (!catchRecord) {
catchRecord = { catchRecord = {
_id: '', // Empty string, not temp ID - will be created by server _id: '', // Empty string, not temp ID - will be created by server
userId: '', userId: userId || '',
pokedexEntryId: pokedexEntry._id, pokedexEntryId: pokedexEntry._id,
haveToEvolve: false, haveToEvolve: false,
caught: false, caught: false,
@@ -23,6 +23,7 @@
{showOrigins} {showOrigins}
{showForms} {showForms}
{showShiny} {showShiny}
{userId}
bind:catchRecord bind:catchRecord
on:updateCatch={updateACatch} on:updateCatch={updateACatch}
/> />