mirror of
https://github.com/jcreek/LivingDexTracker.git
synced 2026-07-13 02:53:45 +00:00
fix(*): Pass userId prop to PokedexEntryCatchRecord component
This commit is contained in:
@@ -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}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user