perf(hydration): optimize page loads and silence background fetch noise
- Implemented SWR pattern for Journal and Site Domain lookups. - Refactored +layout.ts across modules to fire background refreshes instead of blocking. - Updated +layout.svelte to render the layout shell immediately while hydrating. - Silenced 'AbortError' and 'NetworkError' in api_get_object.ts and api_post_object.ts for log_lvl 0. - Resolved duplicate export errors in ae_journals__journal.ts.
This commit is contained in:
@@ -1345,6 +1345,17 @@ email = ${$ae_loc?.email}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{:else if browser && $ae_loc && $ae_loc.allow_access === null}
|
||||
<!-- NEW: Render layout shell while waiting for initial access check -->
|
||||
<div class="min-h-screen flex items-center justify-center">
|
||||
<div class="flex flex-col items-center gap-4">
|
||||
<span class="fas fa-cog fa-spin text-4xl text-primary-500"></span>
|
||||
<div class="text-center">
|
||||
<div class="text-lg font-bold">Initializing Layout...</div>
|
||||
<div class="text-xs opacity-60">Determining access context</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{:else if browser || flag_reload}
|
||||
<div
|
||||
class="flex flex-col items-center justify-center max-w-lg mx-auto space-y-6 border border-red-500 rounded-lg p-4 bg-green-50 dark:bg-green-900 m-8"
|
||||
|
||||
Reference in New Issue
Block a user