diff --git a/src/index.jsx b/src/index.jsx index 280855d5..1705408b 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -66,7 +66,7 @@ subscribe(APP_READY, () => { )} /> - + diff --git a/src/tab-page/TabContainer.jsx b/src/tab-page/TabContainer.jsx index 4961d37d..51a349a6 100644 --- a/src/tab-page/TabContainer.jsx +++ b/src/tab-page/TabContainer.jsx @@ -10,7 +10,6 @@ export default function TabContainer(props) { const { children, fetch, - slice, tab, } = props; @@ -26,14 +25,14 @@ export default function TabContainer(props) { const { courseId, courseStatus, - } = useSelector(state => state[slice]); + } = useSelector(state => state.courseHome); return ( {courseId && } {children} @@ -44,6 +43,5 @@ export default function TabContainer(props) { TabContainer.propTypes = { children: PropTypes.node.isRequired, fetch: PropTypes.func.isRequired, - slice: PropTypes.string.isRequired, tab: PropTypes.string.isRequired, }; diff --git a/src/tab-page/TabContainer.test.jsx b/src/tab-page/TabContainer.test.jsx index 55c81fa9..099d92fd 100644 --- a/src/tab-page/TabContainer.test.jsx +++ b/src/tab-page/TabContainer.test.jsx @@ -20,10 +20,8 @@ describe('Tab Container', () => { beforeEach(async () => { mockFetch = jest.fn().mockImplementation((x) => x); mockData = { - children: [], fetch: mockFetch, tab: 'dummy', - slice: 'courseware', }; const store = await initializeTestStore({ excludeFetchSequence: true }); courseId = store.getState().courseware.courseId; @@ -33,7 +31,9 @@ describe('Tab Container', () => { history.push(`/course/${courseId}`); render( - + + children={[]} + , ); @@ -56,8 +56,11 @@ describe('Tab Container', () => { render={({ match }) => ( mockFetch(match.params.courseId, match.params.targetUserId)} - slice="courseHome" - /> + tab="dummy" + > + children={[]} + + )} />, );