Relocates the functions file from lib root into its module directory, matching the pattern used by all other modules (ae_journals, ae_archives, etc.). Updated all 85 import paths from \$lib/ae_events_functions → \$lib/ae_events/ae_events_functions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
883 B
TypeScript
34 lines
883 B
TypeScript
/** @type {import('./$types').LayoutLoad} */
|
|
console.log(`ae_events +layout.ts`);
|
|
|
|
// Imports
|
|
// import { browser } from '$app/environment';
|
|
// import { events_func } from '$lib/ae_events/ae_events_functions';
|
|
|
|
export async function load({ parent }) {
|
|
const log_lvl: number = 0;
|
|
|
|
const parent_data = await parent();
|
|
|
|
const account_id = parent_data.account_id;
|
|
if (!account_id) {
|
|
console.log(
|
|
`events_pres_mgmt +layout.ts: The account_id was not found in the parent_data!!!`
|
|
);
|
|
return false;
|
|
}
|
|
|
|
const ae_acct = parent_data[account_id];
|
|
if (log_lvl) {
|
|
console.log(`ae_acct = `, ae_acct);
|
|
}
|
|
|
|
// WARNING: Precaution against shared parent_data between sites and sessions.
|
|
parent_data[account_id] = ae_acct;
|
|
|
|
return parent_data;
|
|
}
|
|
|
|
// export const prerender = false;
|
|
// export const prerender = true;
|