Initial commit
Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
Deploy / validate-dispatch (push) Successful in 43s
Deploy / scheduled-rebuild-dev (push) Skipped
Deploy / scheduled-rebuild-master (push) Skipped
Deploy / rollback-dev (push) Skipped
Deploy / rollback-master (push) Skipped
Deploy / changes (push) Successful in 13s
Deploy / secret-scan (push) Successful in 9s
Deploy / app-quality (push) Successful in 11m21s
Deploy / security-deps (push) Successful in 14s
Deploy / context (push) Failing after 1s
Deploy / app-image (push) Skipped
Deploy / deploy-dev (push) Skipped
Deploy / deploy-master (push) Skipped
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import { getEventsService } from "../server/calendar/events-service";
|
||||
import type { CalendarEvent } from "../types";
|
||||
import EventsViewClient from "./EventsViewClient";
|
||||
|
||||
interface EventsViewProps {
|
||||
mode: "special" | "calendar";
|
||||
}
|
||||
|
||||
export default async function EventsView({ mode }: EventsViewProps) {
|
||||
let initialEvents: CalendarEvent[] | null = null;
|
||||
|
||||
try {
|
||||
const service = getEventsService();
|
||||
initialEvents = mode === "special"
|
||||
? await service.getSpecialEvents()
|
||||
: await service.getEvents();
|
||||
} catch {
|
||||
// The page remains available while the calendar source is unavailable.
|
||||
}
|
||||
|
||||
return (
|
||||
<EventsViewClient
|
||||
mode={mode}
|
||||
initialEvents={initialEvents}
|
||||
referenceDate={new Date().toISOString()}
|
||||
fixedReferenceDate={false}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user