diff --git a/apps/web/context/order.tsx b/apps/web/context/order.tsx index 6052f4f..b37eb6d 100644 --- a/apps/web/context/order.tsx +++ b/apps/web/context/order.tsx @@ -4,11 +4,9 @@ import { createContext, type PropsWithChildren, useMemo, useReducer, useState } type Action = { payload: Steps; type: 'SET_STEP' } | { type: 'NEXT_STEP' }; type ContextType = { - clientId: null | string; - masterId: null | string; + customerId: null | string; nextStep: () => void; - setClientId: (clientId: string) => void; - setMasterId: (masterId: string) => void; + setCustomerId: (customerId: string) => void; setStep: (step: Steps) => void; step: Steps; }; @@ -54,22 +52,18 @@ function useStep() { export const OrderContext = createContext({} as ContextType); export function OrderContextProvider({ children }: Readonly) { - const { customerId: clientId, setCustomerId: setClientId } = useCustomerState(); - const { customerId: masterId, setCustomerId: setMasterId } = useCustomerState(); - + const { customerId, setCustomerId } = useCustomerState(); const { nextStep, setStep, step } = useStep(); const value = useMemo( () => ({ - clientId, - masterId, + customerId, nextStep, - setClientId, - setMasterId, + setCustomerId, setStep, step, }), - [clientId, masterId, nextStep, setClientId, setMasterId, setStep, step], + [customerId, nextStep, setCustomerId, setStep, step], ); return {children};