diff --git a/packages/atoms/availabilitylist/Availability.tsx b/packages/atoms/availabilitylist/Availability.tsx index 0bee8d2400..39d71ea874 100644 --- a/packages/atoms/availabilitylist/Availability.tsx +++ b/packages/atoms/availabilitylist/Availability.tsx @@ -14,14 +14,7 @@ import { Fragment } from "react"; import { availabilityAsString } from "@calcom/lib/availability"; -export function Availability({ - schedule, - isDeletable, - displayOptions, - updateDefault, - duplicateFunction, - deleteFunction, -}: { +type AvailabilityProps = { schedule: Schedule; isDeletable: boolean; updateDefault: ({ scheduleId, isDefault }: { scheduleId: number; isDefault: boolean }) => void; @@ -31,7 +24,16 @@ export function Availability({ timeZone?: string; hour12?: boolean; }; -}) { +}; + +export function Availability({ + schedule, + isDeletable, + displayOptions, + updateDefault, + duplicateFunction, + deleteFunction, +}: AvailabilityProps) { const { toast } = useToast(); return ( diff --git a/packages/atoms/availabilitylist/AvailabilityList.tsx b/packages/atoms/availabilitylist/AvailabilityList.tsx index feb03c985f..6b9cb9fcd4 100644 --- a/packages/atoms/availabilitylist/AvailabilityList.tsx +++ b/packages/atoms/availabilitylist/AvailabilityList.tsx @@ -23,13 +23,7 @@ export type Schedule = { timezone?: string; }; -export function AvailabilityList({ - schedules, - onCreateMutation, - updateMutation, - duplicateMutation, - deleteMutation, -}: { +type AvailabilityListProps = { schedules: Schedule[] | []; onCreateMutation: (values: { onSucess: (schedule: Schedule) => void; @@ -38,7 +32,15 @@ export function AvailabilityList({ updateMutation: ({ scheduleId, isDefault }: { scheduleId: number; isDefault: boolean }) => void; duplicateMutation: ({ scheduleId }: { scheduleId: number }) => void; deleteMutation: ({ scheduleId }: { scheduleId: number }) => void; -}) { +}; + +export function AvailabilityList({ + schedules, + onCreateMutation, + updateMutation, + duplicateMutation, + deleteMutation, +}: AvailabilityListProps) { if (schedules.length === 0) { return (