mirror of
https://github.com/hanzoai/calendar.git
synced 2026-10-30 14:46:43 +00:00
28 lines
929 B
TypeScript
28 lines
929 B
TypeScript
import { CalendarToggleContainerComponent } from "@calcom/features/troubleshooter/components/CalendarToggleContainerComponent";
|
|
import { useConnectedCalendars } from "../../hooks/useConnectedCalendars";
|
|
|
|
interface CalendarToggleContainerProps {
|
|
onManageCalendarsClick?: () => void;
|
|
onInstallCalendarClick?: () => void;
|
|
}
|
|
|
|
export function CalendarToggleContainer({
|
|
onManageCalendarsClick,
|
|
onInstallCalendarClick,
|
|
}: CalendarToggleContainerProps): JSX.Element {
|
|
const calendars = useConnectedCalendars({});
|
|
|
|
return (
|
|
<CalendarToggleContainerComponent
|
|
connectedCalendars={calendars.data?.connectedCalendars ?? []}
|
|
isLoading={calendars.isLoading}
|
|
{...(onManageCalendarsClick
|
|
? { manageCalendarsAction: { onClick: onManageCalendarsClick } }
|
|
: {})}
|
|
{...(onInstallCalendarClick
|
|
? { installCalendarAction: { onClick: onInstallCalendarClick } }
|
|
: {})}
|
|
/>
|
|
);
|
|
}
|