update: hide empty claimed wishlists, move local wishlists, cleanup comments
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user