--- import { translations, type Lang } from '@data/i18n'; import ProgramCard from './ProgramCard.astro'; const { lang = 'no', data } = Astro.props as { lang?: Lang, data: any }; const t = translations[lang]; const now = new Date(); const osloNow = new Date( now.toLocaleString("en-US", { timeZone: "Europe/Oslo" }) ); osloNow.setHours(0, 0, 0, 0); --- {data ? (

{t.nav.program}

{Object.entries(data).map(([date, items], idx) => { const dateInOslo = new Date( new Date(date).toLocaleString("en-US", { timeZone: "Europe/Oslo" }) ); dateInOslo.setHours(0, 0, 0, 0); return ( ); })}

{t.program.programMore}

) : (
{t.program.noProgram}
)}