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 { RouterOutputs } from "@calcom/trpc/react"; import { Badge, Button, Dropdown, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, Icon, } from "@calcom/ui"; export function ScheduleListItem({ schedule, deleteFunction, displayOptions, }: { schedule: RouterOutputs["viewer"]["availability"]["list"]["schedules"][number]; deleteFunction: ({ scheduleId }: { scheduleId: number }) => void; displayOptions?: { timeZone?: string; hour12?: boolean; }; }) { const { t, i18n } = useLocale(); return (
  • {schedule.name} {schedule.isDefault && ( {t("default")} )}

    {schedule.availability.map((availability: Availability) => ( {availabilityAsString(availability, { locale: i18n.language, hour12: displayOptions?.hour12, })}
    ))} {schedule.timeZone && schedule.timeZone !== displayOptions?.timeZone && (

     {schedule.timeZone}

    )}

  • ); }