ab4ab1dfba
* feat: add next event indicator to Show Page Calendar tab Closes #4289 * feat: improve calendar animation * refactor: add some utils and fix sorting edge case with full day * refactor: rename CalendarCurrentEventIndicator to CalendarCurrentEventCursor * fix: fix tests * Fix lint --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
8 lines
293 B
TypeScript
8 lines
293 B
TypeScript
import { endOfDay } from 'date-fns';
|
|
|
|
import { CalendarEvent } from '@/activities/calendar/types/CalendarEvent';
|
|
|
|
export const getCalendarEventEndDate = (
|
|
calendarEvent: Pick<CalendarEvent, 'endsAt' | 'isFullDay' | 'startsAt'>,
|
|
) => calendarEvent.endsAt ?? endOfDay(calendarEvent.startsAt);
|