diff --git a/src/routes/bills/[id]/+page.server.ts b/src/routes/bills/[id]/+page.server.ts index ecf2e5b9..dd784fa9 100644 --- a/src/routes/bills/[id]/+page.server.ts +++ b/src/routes/bills/[id]/+page.server.ts @@ -13,6 +13,10 @@ import type { Bill } from '$models/bill'; import { BillEventType, type BillEvent } from '$models/bill-event'; import { DefaultVoteOption, DefaultVotingResult } from '$models/voting'; +export async function entries() { + return (await fetchBills()).map(({ id }) => ({ id })); +} + const expectedEventOrder = Object.values(BillEventType).reverse(); export async function load({ params }) { diff --git a/src/routes/politicians/[id]/+page.server.ts b/src/routes/politicians/[id]/+page.server.ts index 09d14c87..f6aaa9f8 100644 --- a/src/routes/politicians/[id]/+page.server.ts +++ b/src/routes/politicians/[id]/+page.server.ts @@ -19,6 +19,10 @@ export interface VotingAbsentStats { averageAbsentVoting: number; } +export async function entries() { + return (await fetchPoliticians()).map(({ id }) => ({ id })); +} + export async function load({ params }) { const politician = await fetchFromIdOr404(fetchPoliticians, params.id); diff --git a/src/routes/votings/[id]/+page.server.ts b/src/routes/votings/[id]/+page.server.ts index 37c98dc9..bbb99df7 100644 --- a/src/routes/votings/[id]/+page.server.ts +++ b/src/routes/votings/[id]/+page.server.ts @@ -8,6 +8,10 @@ import { createSeo } from '$lib/seo.js'; import type { Bill } from '$models/bill'; import type { ResultsByAffiliation } from './+page.js'; +export async function entries() { + return (await fetchVotings()).map(({ id }) => ({ id })); +} + export async function load({ params }) { const voting = await fetchFromIdOr404(fetchVotings, params.id); const votes = (await fetchVotes()).filter(({ votingId }) => votingId === voting.id);