Fix remaining console logs and types

This commit is contained in:
gpt-engineer-app[bot]
2025-11-03 20:04:11 +00:00
parent 6fbaf0c606
commit 2cd6b2c6c3
10 changed files with 127 additions and 42 deletions

View File

@@ -69,7 +69,7 @@ export function UserListManager() {
});
} else {
// Map Supabase data to UserTopList interface
const mappedLists: UserTopList[] = (data || []).map((list: any) => ({
const mappedLists: UserTopList[] = (data || []).map(list => ({
id: list.id,
user_id: list.user_id,
title: list.title,
@@ -78,7 +78,16 @@ export function UserListManager() {
is_public: list.is_public,
created_at: list.created_at,
updated_at: list.updated_at,
items: list.list_items || [],
items: (list.list_items || []).map(item => ({
id: item.id,
list_id: list.id, // Add the parent list ID
entity_type: item.entity_type as 'park' | 'ride' | 'company',
entity_id: item.entity_id,
position: item.position,
notes: item.notes,
created_at: item.created_at || new Date().toISOString(),
updated_at: item.updated_at || new Date().toISOString(),
})),
}));
setLists(mappedLists);
}