19 lines
484 B
TypeScript
19 lines
484 B
TypeScript
import { createContext } from 'react';
|
|
|
|
import { StoreProduct } from '@medusajs/types';
|
|
import { noop } from 'lodash';
|
|
|
|
const BookingContext = createContext<{
|
|
timeSlots: string[];
|
|
selectedService: StoreProduct | null;
|
|
setSelectedService: (selectedService: any) => void;
|
|
updateTimeSlots: (serviceId: number) => Promise<void>;
|
|
}>({
|
|
timeSlots: [],
|
|
selectedService: null,
|
|
setSelectedService: (_) => _,
|
|
updateTimeSlots: async (_) => noop(),
|
|
});
|
|
|
|
export { BookingContext };
|