- Custom toolbar replacing FullCalendar defaults (nav, today, view switcher) - Calendar sidebar with visibility toggles, color dots, add/edit support - CalendarForm dialog for creating/editing calendars with color swatches - EventForm updated to use calendar dropdown instead of color picker - CSS overrides: accent-tinted today highlight, now indicator, rounded event pills - Types updated for Calendar interface and mixed id types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
14 lines
328 B
TypeScript
14 lines
328 B
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import api from '@/lib/api';
|
|
import type { Calendar } from '@/types';
|
|
|
|
export function useCalendars() {
|
|
return useQuery({
|
|
queryKey: ['calendars'],
|
|
queryFn: async () => {
|
|
const { data } = await api.get<Calendar[]>('/calendars');
|
|
return data;
|
|
},
|
|
});
|
|
}
|