mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 12:11:17 -05:00
Fix remaining console logs and types
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user