File tree Expand file tree Collapse file tree
courseware/course/course-exit
plugin-slots/CourseExitPluginSlots/CourseExitViewCoursesPluginSlot Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { useEffect } from 'react' ;
22
3- import { getConfig } from '@edx/frontend-platform' ;
43import { useSelector } from 'react-redux' ;
54import { Navigate } from 'react-router-dom' ;
65
@@ -61,7 +60,7 @@ const CourseExit = () => {
6160
6261 return (
6362 < >
64- < CourseExitViewCoursesPluginSlot href = { ` ${ getConfig ( ) . LMS_BASE_URL } /dashboard` } />
63+ < CourseExitViewCoursesPluginSlot />
6564 { body }
6665 </ >
6766 ) ;
Original file line number Diff line number Diff line change 11import { Button } from '@openedx/paragon' ;
22import PropTypes from 'prop-types' ;
3+ import { getConfig } from '@edx/frontend-platform' ;
34import { PluginSlot } from '@openedx/frontend-plugin-framework' ;
45import { useIntl } from '@edx/frontend-platform/i18n' ;
56import messages from '../../../courseware/course/course-exit/messages' ;
@@ -24,14 +25,15 @@ ViewCoursesLink.propTypes = {
2425 } ) . isRequired ,
2526} ;
2627
27- const CourseExitViewCoursesPluginSlot = ( { href } ) => (
28- < PluginSlot id = "course_exit_view_courses_slot" >
29- < ViewCoursesLink content = { { href } } />
30- </ PluginSlot >
31- ) ;
32-
33- CourseExitViewCoursesPluginSlot . propTypes = {
34- href : PropTypes . string . isRequired ,
28+ const CourseExitViewCoursesPluginSlot = ( ) => {
29+ const href = `${ getConfig ( ) . LMS_BASE_URL } /dashboard` ;
30+ return (
31+ < PluginSlot id = "course_exit_view_courses_slot" >
32+ < ViewCoursesLink content = { { href } } />
33+ </ PluginSlot >
34+ ) ;
3535} ;
3636
37+ CourseExitViewCoursesPluginSlot . propTypes = { } ;
38+
3739export default CourseExitViewCoursesPluginSlot ;
You can’t perform that action at this time.
0 commit comments