@xcelsior/ui-chat 2.0.5 → 2.0.6
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/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/BookingSlotPicker.tsx +3 -0
package/package.json
CHANGED
|
@@ -13,6 +13,9 @@ export function BookingSlotPicker({ data, theme, onSlotSelected, disabled = fals
|
|
|
13
13
|
const [selectedDateIndex, setSelectedDateIndex] = useState(0);
|
|
14
14
|
const [selectedSlot, setSelectedSlot] = useState<{ date: string; time: string } | null>(null);
|
|
15
15
|
|
|
16
|
+
// Guard: if data is missing or has no dates, render nothing
|
|
17
|
+
if (!data?.availableDates?.length) return null;
|
|
18
|
+
|
|
16
19
|
const bgColor = theme?.background || '#00001a';
|
|
17
20
|
const isLightTheme = (() => {
|
|
18
21
|
if (!bgColor.startsWith('#')) return false;
|