From df6ee73e053e300ff08341f052c2ea6ce0d0aa83 Mon Sep 17 00:00:00 2001 From: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com> Date: Sat, 15 Mar 2025 00:01:35 +0530 Subject: [PATCH] fix: schedule.get unneccsary called from avaiablity view (#20094) --- .../schedules/components/ScheduleListItem.tsx | 87 +++++++++---------- 1 file changed, 41 insertions(+), 46 deletions(-) diff --git a/packages/features/schedules/components/ScheduleListItem.tsx b/packages/features/schedules/components/ScheduleListItem.tsx index a781ed5c8b..aa6670153a 100644 --- a/packages/features/schedules/components/ScheduleListItem.tsx +++ b/packages/features/schedules/components/ScheduleListItem.tsx @@ -5,7 +5,6 @@ import { availabilityAsString } from "@calcom/lib/availability"; import { useLocale } from "@calcom/lib/hooks/useLocale"; import { sortAvailabilityStrings } from "@calcom/lib/weekstart"; import type { RouterOutputs } from "@calcom/trpc/react"; -import { trpc } from "@calcom/trpc/react"; import { Badge, Button, @@ -39,8 +38,6 @@ export function ScheduleListItem({ }) { const { t, i18n } = useLocale(); - const { data, isPending } = trpc.viewer.availability.schedule.get.useQuery({ scheduleId: schedule.id }); - return (