Files
famapp/src/app/calendar/page.tsx
T
ginnoir e1c2a090fb feat: p2 batch 28-31 reminders lists comments bang stats
Calendar events support multiple reminder offsets with presets and per-user defaults.

Lists index adds inline task entry and list property editing.

Generic entity comments on list detail. New bangs.stats dashboard widget.

Closes Gitea #28, #29, #30, #31. Migrations 0022 and 0023.
2026-07-04 22:17:35 -05:00

33 lines
930 B
TypeScript

import { CalendarShell } from "@/modules/calendar/components/calendar-shell";
import {
getDefaultEventReminderOffsets,
listCalendars,
listEvents,
} from "@/modules/calendar/server/queries";
import { getCurrentSession } from "@/lib/session";
import type { CalView } from "@/modules/_core/themes";
export default async function CalendarPage() {
const now = new Date();
const from = new Date(now);
from.setMonth(from.getMonth() - 2);
const to = new Date(now);
to.setMonth(to.getMonth() + 10);
const [{ user }, calendars, events, defaultReminderOffsets] = await Promise.all([
getCurrentSession(),
listCalendars(),
listEvents({ from, to, calendarIds: "all" }),
getDefaultEventReminderOffsets(),
]);
return (
<CalendarShell
calendars={calendars}
events={events}
defaultView={user.themeCalView as CalView}
defaultReminderOffsets={defaultReminderOffsets}
/>
);
}