diff --git a/src/containers/SelectSessionModal/hooks.js b/src/containers/SelectSessionModal/hooks.js index 85c070a..02434be 100644 --- a/src/containers/SelectSessionModal/hooks.js +++ b/src/containers/SelectSessionModal/hooks.js @@ -18,7 +18,7 @@ export const useSelectSessionModalData = () => { const dispatch = useDispatch(); const selectedCardId = appHooks.useSelectSessionModalData().cardId; const { - entitlementessions, + entitlementSessions, isFulfilled, uuid, } = appHooks.useCardEntitlementData(selectedCardId); @@ -52,7 +52,7 @@ export const useSelectSessionModalData = () => { closeSessionModal: updateCallback(dispatch, null), openSessionModal: (cardId) => updateCallback(dispatch, cardId), showLeaveOption: isFulfilled, - entitlementessions, + entitlementSessions, hint, header, selectedSession, diff --git a/src/containers/SelectSessionModal/hooks.test.js b/src/containers/SelectSessionModal/hooks.test.js index 3a01647..1b03599 100644 --- a/src/containers/SelectSessionModal/hooks.test.js +++ b/src/containers/SelectSessionModal/hooks.test.js @@ -40,7 +40,7 @@ const selectSessionData = { }; const entitlementData = { - entitlementessions: [ + ntitlementSessions: [ { startDate: '1/2/2000', endDate: '1/2/2020', cardId: 'session-id-1' }, { startDate: '2/3/2000', endDate: '2/3/2020', cardId: 'session-id-2' }, { startDate: '3/4/2000', endDate: '3/4/2020', cardId: 'session-id-3' }, diff --git a/src/containers/SelectSessionModal/index.jsx b/src/containers/SelectSessionModal/index.jsx index ee4b48b..ce713c3 100644 --- a/src/containers/SelectSessionModal/index.jsx +++ b/src/containers/SelectSessionModal/index.jsx @@ -17,7 +17,7 @@ import messages from './messages'; export const SelectSessionModal = () => { const { - entitlementessions, + entitlementSessions, showModal, closeSessionModal, showLeaveOption, @@ -48,7 +48,7 @@ export const SelectSessionModal = () => { onChange={handleSelection} value={selectedSession} > - {entitlementessions?.map((session) => ( + {entitlementSessions?.map((session) => ( {dateFormatter(formatDate, session.startDate)} - {dateFormatter(formatDate, session.endDate)} diff --git a/src/containers/SelectSessionModal/index.test.jsx b/src/containers/SelectSessionModal/index.test.jsx index d214dac..f90cc58 100644 --- a/src/containers/SelectSessionModal/index.test.jsx +++ b/src/containers/SelectSessionModal/index.test.jsx @@ -10,7 +10,7 @@ jest.mock('./hooks', () => ({ })); const hookReturn = { - entitlementessions: [], + entitlementSessions: [], showModal: true, closeSessionModal: jest.fn().mockName('useSelectSessionModalData.closeSessionModal'), showLeaveOption: true, @@ -36,7 +36,7 @@ describe('SelectSessionModal', () => { test('modal with leave option ', () => { hooks.mockReturnValueOnce({ ...hookReturn, - entitlementessions: [...availableSessions], + entitlementSessions: [...availableSessions], }); expect(shallow()).toMatchSnapshot(); }); @@ -44,7 +44,7 @@ describe('SelectSessionModal', () => { test('modal without leave option ', () => { hooks.mockReturnValueOnce({ ...hookReturn, - entitlementessions: [...availableSessions], + entitlementSessions: [...availableSessions], showLeaveOption: false, }); expect(shallow()).toMatchSnapshot(); diff --git a/src/data/redux/app/selectors.js b/src/data/redux/app/selectors.js index 8ad4127..f3102d6 100644 --- a/src/data/redux/app/selectors.js +++ b/src/data/redux/app/selectors.js @@ -97,7 +97,7 @@ export const courseCard = StrictDict({ return { canChange: !deadlinePassed, canViewCourse: entitlement.canViewCourse, - entitlementessions: entitlement.availableSessions, + entitlementSessions: entitlement.availableSessions, isEntitlement: entitlement.isEntitlement, isExpired: entitlement.isExpired, isFulfilled: entitlement.isFulfilled,