Implement date formatting per workspace member settings We'll need another round to maybe initialize all workspaces on the default settings. For now the default behavior is to take system settings if nothing is found in DB. --------- Co-authored-by: Weiko <corentin@twenty.com>
20 lines
640 B
TypeScript
20 lines
640 B
TypeScript
import { createContext } from 'react';
|
|
|
|
import { TimelineCalendarEvent } from '~/generated/graphql';
|
|
|
|
type CalendarContextValue = {
|
|
calendarEventsByDayTime: Record<number, TimelineCalendarEvent[] | undefined>;
|
|
currentCalendarEvent?: TimelineCalendarEvent;
|
|
displayCurrentEventCursor?: boolean;
|
|
getNextCalendarEvent: (
|
|
calendarEvent: TimelineCalendarEvent,
|
|
) => TimelineCalendarEvent | undefined;
|
|
updateCurrentCalendarEvent: () => void;
|
|
};
|
|
|
|
export const CalendarContext = createContext<CalendarContextValue>({
|
|
calendarEventsByDayTime: {},
|
|
getNextCalendarEvent: () => undefined,
|
|
updateCurrentCalendarEvent: () => {},
|
|
});
|