Skip to content

Commit cbc27a7

Browse files
fix: incorrect slot duration when rescheduling bookings (#23290)
* fix: incorrect slot duration when rescheduling bookings * chore * chore * some code refactor * chore * chore * fix --------- Co-authored-by: unknown <adhabal2002@gmail.com> Co-authored-by: Anik Dhabal Babu <81948346+anikdhabal@users.noreply.github.com>
1 parent a218964 commit cbc27a7

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

  • packages/features/bookings/Booker

packages/features/bookings/Booker/store.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -370,18 +370,8 @@ export const createBookerStore = () =>
370370
// if the user reschedules a booking right after the confirmation page.
371371
// In that case the time would still be store in the store, this way we
372372
// force clear this.
373-
// Also, fetch the original booking duration if user is rescheduling and
374-
// update the selectedDuration
375373
if (rescheduleUid && bookingData) {
376374
set({ selectedTimeslot: null });
377-
const originalBookingLength = dayjs(bookingData?.endTime).diff(
378-
dayjs(bookingData?.startTime),
379-
"minutes"
380-
);
381-
set({ selectedDuration: originalBookingLength });
382-
if (!isPlatform || allowUpdatingUrlParams) {
383-
updateQueryParam("duration", originalBookingLength ?? "");
384-
}
385375
}
386376
if (month) set({ month });
387377

0 commit comments

Comments
 (0)