diff --git a/app/[locale]/[username]/page.tsx b/app/[locale]/[username]/page.tsx index 815f0f2e..a6ee7f5d 100644 --- a/app/[locale]/[username]/page.tsx +++ b/app/[locale]/[username]/page.tsx @@ -61,12 +61,12 @@ export default async function ProfilePage({ // Prepare data for client component const initialData = { user: userData.user, - teams: teamsData.parties || [], - raidGroups: raidGroupsData.raid_groups || [], + teams: teamsData.results || [], + raidGroups: raidGroupsData || [], pagination: { - current_page: teamsData.pagination?.current_page || 1, - total_pages: teamsData.pagination?.total_pages || 1, - record_count: teamsData.pagination?.record_count || 0 + current_page: page, + total_pages: teamsData.meta?.total_pages || 1, + record_count: teamsData.meta?.count || 0 } } diff --git a/app/[locale]/saved/page.tsx b/app/[locale]/saved/page.tsx index 7656dec5..be5e3230 100644 --- a/app/[locale]/saved/page.tsx +++ b/app/[locale]/saved/page.tsx @@ -50,7 +50,7 @@ export default async function SavedPage({ ]) // Filter teams by element/raid if needed - let filteredTeams = savedTeamsData.parties || []; + let filteredTeams = savedTeamsData.results || []; if (element) { filteredTeams = filteredTeams.filter(party => party.element === element) @@ -63,8 +63,8 @@ export default async function SavedPage({ // Prepare data for client component const initialData = { teams: filteredTeams, - raidGroups: raidGroupsData.raid_groups || [], - totalCount: savedTeamsData.parties?.length || 0 + raidGroups: raidGroupsData || [], + totalCount: savedTeamsData.results?.length || 0 } return ( diff --git a/app/[locale]/teams/page.tsx b/app/[locale]/teams/page.tsx index 43cc4232..bccf7313 100644 --- a/app/[locale]/teams/page.tsx +++ b/app/[locale]/teams/page.tsx @@ -29,12 +29,12 @@ export default async function TeamsPage({ // Prepare data for client component const initialData = { - teams: teamsData.parties || [], - raidGroups: raidGroupsData.raid_groups || [], + teams: teamsData.results || [], + raidGroups: raidGroupsData || [], pagination: { - current_page: teamsData.pagination?.current_page || 1, - total_pages: teamsData.pagination?.total_pages || 1, - record_count: teamsData.pagination?.record_count || 0 + current_page: page, + total_pages: teamsData.meta?.total_pages || 1, + record_count: teamsData.meta?.count || 0 } };