export async function getServerSideProps({ res }) { res.setHeader("Cache-Control", "public, s-maxage=10, stale-while-revalidate=59") const eventsResponse = await fetch("http://localhost:3000/api/events", { method: "GET", headers: { "Content-Type": "application/json", }, }) const allEvents = await eventsResponse.json() return { props: { allEvents }, } } export default function Dashboard({ allEvents }) { return ( <>

IsaCon

Events

{allEvents.data.map((event) => (
{event.name}
))}
) }