Implementing bug fix for Svelte params not being ready under my data value. Loading and referencing the params directly/explicitly instead.
This commit is contained in:
@@ -3,13 +3,11 @@ console.log(`ae_events_leads [slug] +page.ts start`);
|
||||
|
||||
import { events_func } from '$lib/ae_events_functions';
|
||||
|
||||
export async function load({ parent }) { // route
|
||||
// console.log(`ae_events_leads +page.ts data.params:`, params);
|
||||
// console.log(`ae_events_leads +page.ts data.route:`, route);
|
||||
// console.log(`ae_events_leads +page.ts data.url:`, url);
|
||||
export async function load({ params, parent }) { // route
|
||||
let log_lvl = 0;
|
||||
|
||||
let data = await parent();
|
||||
// console.log(`ae_events_leads +page.ts data:`, data);
|
||||
// console.log(`ae_events_leads exhibit [slug] +page.ts data:`, data);
|
||||
|
||||
let account_id = data.account_id;
|
||||
let ae_acct = data[account_id];
|
||||
@@ -22,11 +20,9 @@ export async function load({ parent }) { // route
|
||||
|
||||
data.ae_events_leads_exhibit_slug_page_ts = true;
|
||||
|
||||
// let param_slug_event_exhibit_id = data.params.slug;
|
||||
|
||||
let event_exhibit_id = data.params.slug;
|
||||
let event_exhibit_id = params.slug;
|
||||
if (!event_exhibit_id) {
|
||||
console.log(`events_leads [slug] +layout.ts: The event_exhibit_id was not found in the data.params.slug!!!`);
|
||||
console.log(`events_leads exhibit [slug] +page.ts: The event_exhibit_id was not found in the params.slug!!!`);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -37,8 +33,8 @@ export async function load({ parent }) { // route
|
||||
ae_acct.slct.event_exhibit_obj = await load_event_exhibit_obj;
|
||||
|
||||
let load_event_exhibit_tracking_obj_li = events_func.handle_load_ae_obj_li__exhibit_tracking({
|
||||
api_cfg: ae_acct.api,
|
||||
exhibit_id: event_exhibit_id,
|
||||
api_cfg: ae_acct.api,
|
||||
exhibit_id: event_exhibit_id,
|
||||
params: {enabled: 'all', qry__limit: 550},
|
||||
try_cache: false
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user