Files
calendar/companion/utils/getEventDuration.ts
T

7 lines
259 B
TypeScript

import { EventType } from "../hooks";
export const getEventDuration = (eventType: EventType): number => {
// Prefer lengthInMinutes (API field), fallback to length for backwards compatibility
return eventType.lengthInMinutes ?? eventType.length ?? 0;
};