update: hide empty claimed wishlists, move local wishlists, cleanup comments

This commit is contained in:
rasmusq
2025-12-21 17:37:54 +01:00
parent 0b1e2b8dd3
commit d046c66bc7
4 changed files with 7 additions and 24 deletions
@@ -21,11 +21,9 @@
let localWishlists = $state<LocalWishlist[]>([]);
let enrichedWishlists = $state<any[]>([]);
// Load local wishlists on mount and fetch their data from server
onMount(async () => {
localWishlists = getLocalWishlists();
// Fetch full wishlist data for each local wishlist
const promises = localWishlists.map(async (local) => {
try {
const response = await fetch(`/api/wishlist/${local.ownerToken}`);
@@ -39,7 +37,6 @@
} catch (error) {
console.error('Failed to fetch wishlist data:', error);
}
// Fallback to local data if fetch fails
return {
id: local.ownerToken,
title: local.title,