@bailierich/booking-components 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/BookingFlow/steps/DateSelection.tsx +6 -1
- package/components/Forms/FormField.tsx +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/lib/storage.ts +5 -4
- package/package.json +1 -1
- package/tsup.config.ts +1 -1
- package/dist/index-CqGdjmIM.d.mts +0 -476
- package/dist/index-CqGdjmIM.d.ts +0 -476
- package/dist/index.d.mts +0 -1075
- package/dist/index.d.ts +0 -1075
- package/dist/styles/index.d.mts +0 -1
- package/dist/styles/index.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useState, useMemo } from 'react';
|
|
3
|
+
import { useState, useMemo, useEffect } from 'react';
|
|
4
4
|
import { motion } from 'framer-motion';
|
|
5
5
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
6
6
|
import type { DateSelectionSettings } from '../../../types';
|
|
@@ -119,6 +119,11 @@ export function DateSelection({
|
|
|
119
119
|
|
|
120
120
|
const [currentMonth, setCurrentMonth] = useState(initialMonth);
|
|
121
121
|
|
|
122
|
+
// Reset calendar month when dates transition from mock to real (or vice versa)
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
setCurrentMonth(initialMonth);
|
|
125
|
+
}, [initialMonth]);
|
|
126
|
+
|
|
122
127
|
// Create a Set for O(1) lookup of available dates
|
|
123
128
|
const availableDatesSet = useMemo(() => new Set(effectiveDates), [effectiveDates]);
|
|
124
129
|
|
|
@@ -362,7 +362,7 @@ export default function FormField({ field, value, error, onChange, businessId, f
|
|
|
362
362
|
left: 'mr-auto',
|
|
363
363
|
center: 'mx-auto',
|
|
364
364
|
right: 'ml-auto'
|
|
365
|
-
}[fieldData.imageAlignment || 'center'];
|
|
365
|
+
}[(fieldData.imageAlignment || 'center') as 'left' | 'center' | 'right'];
|
|
366
366
|
|
|
367
367
|
const containerStyle: React.CSSProperties = {
|
|
368
368
|
maxWidth,
|