fix: Resolve badge search reactivity and SSR issues
This commit fixes several issues with the new badge search functionality. It resolves a 500 Internal Error by moving the Dexie liveQuery into an onMount block to prevent server-side execution. It also fixes a Svelte 5 reactivity issue by using a more explicit subscription pattern for the liveQuery and by correctly accessing state variables in the template. The badge search results are now correctly displayed.
This commit is contained in:
@@ -48,7 +48,7 @@
|
||||
if (log_lvl) {
|
||||
console.log(`*** LiveQuery: lq__event_badge_obj *** event_badge_id=${event_badge_id}`);
|
||||
}
|
||||
let results = await db_events.badge.get(event_badge_id);
|
||||
let results = await db_events.badge.where('event_badge_id').equals(event_badge_id).first();
|
||||
|
||||
return results;
|
||||
})
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<script lang="ts">
|
||||
// Page for printing badges
|
||||
</script>
|
||||
|
||||
<h1 class="h1">Print Badges</h1>
|
||||
|
||||
<p>This page will be used for printing badges.</p>
|
||||
@@ -0,0 +1,7 @@
|
||||
<script lang="ts">
|
||||
// Page for reviewing badges
|
||||
</script>
|
||||
|
||||
<h1 class="h1">Review Badges</h1>
|
||||
|
||||
<p>This page will be used for reviewing badges.</p>
|
||||
Reference in New Issue
Block a user