owltide/app/schedule/page.tsx
Hornwitser 3e9faa0c03 Signal schedule page is dynamic
Without this the page pre-render is cached, and a hydration error is
thrown when this cached pre-render doesn't match the JS rendered version.
2025-02-27 22:21:08 +01:00

30 lines
794 B
TypeScript

import Timetable from "@/ui/timetable"
import { Schedule } from "./types"
import { readFile } from "fs/promises"
import { ScheduleProvider } from "./context"
import { Events } from "@/ui/events";
import { Locations } from "@/ui/locations";
import { EventsEdit } from "@/ui/events-edit";
export const dynamic = "force-dynamic";
export default async function page() {
const schedule: Schedule = JSON.parse(await readFile("schedule.json", "utf-8"));
return (
<ScheduleProvider schedule={schedule}>
<main>
<h1>Schedule & Events</h1>
<p>
Study carefully, we only hold these events once a year.
</p>
<h2>Schedule</h2>
<Timetable />
<EventsEdit />
<h2>Events</h2>
<Events />
<h2>Locations</h2>
<Locations />
</main>
</ScheduleProvider>
);
}