From a7bd4aee856e9781c6aada83d591c37776cc0a1e Mon Sep 17 00:00:00 2001 From: Lauris Skraucis Date: Wed, 24 Apr 2024 16:36:29 +0200 Subject: [PATCH] fix: booker atom month reset (#14732) --- packages/features/bookings/Booker/store.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/features/bookings/Booker/store.ts b/packages/features/bookings/Booker/store.ts index 2a9e187ee1..fb650cea55 100644 --- a/packages/features/bookings/Booker/store.ts +++ b/packages/features/bookings/Booker/store.ts @@ -209,6 +209,10 @@ export const useBookerStore = create((set, get) => ({ }, month: getQueryParam("month") || getQueryParam("date") || dayjs().format("YYYY-MM"), setMonth: (month: string | null) => { + if (!month) { + removeQueryParam("month"); + return; + } set({ month, selectedTimeslot: null }); updateQueryParam("month", month ?? ""); get().setSelectedDate(null);