import { DotsHorizontalIcon, TrashIcon } from "@heroicons/react/solid"; import Link from "next/link"; import { Fragment } from "react"; import { availabilityAsString } from "@calcom/lib/availability"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { Availability } from "@calcom/prisma/client"; import { Button } from "@calcom/ui"; import Dropdown, { DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "@calcom/ui/Dropdown"; import { inferQueryOutput } from "@lib/trpc"; export function ScheduleListItem({ schedule, deleteFunction, isDeleting = false, }: { schedule: inferQueryOutput<"viewer.availability.list">["schedules"][number]; deleteFunction: ({ scheduleId }: { scheduleId: number }) => void; isDeleting: boolean; }) { const { t, i18n } = useLocale(); return (
  • {schedule.name} {schedule.isDefault && ( {t("default")} )}

    {schedule.availability.map((availability: Availability) => ( {availabilityAsString(availability, i18n.language)}
    ))}

  • ); }