File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed
Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -19,9 +19,9 @@ import { CourseOutlineMobileSidebarTriggerSlot } from '../../plugin-slots/Course
1919import { CourseBreadcrumbsSlot } from '../../plugin-slots/CourseBreadcrumbsSlot' ;
2020
2121const Course = ( {
22- courseId = null ,
23- sequenceId = null ,
24- unitId = null ,
22+ courseId,
23+ sequenceId,
24+ unitId,
2525 nextSequenceHandler,
2626 previousSequenceHandler,
2727 unitNavigationHandler,
@@ -137,6 +137,12 @@ Course.propTypes = {
137137 windowWidth : PropTypes . number . isRequired ,
138138} ;
139139
140+ Course . defaultProps = {
141+ courseId : null ,
142+ sequenceId : null ,
143+ unitId : null ,
144+ } ;
145+
140146const CourseWrapper = ( props ) => {
141147 // useWindowSize initially returns an undefined width intentionally at first.
142148 // See https://www.joshwcomeau.com/react/the-perils-of-rehydration/ for why.
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ function popFlashMessages() {
2929 return popLocalStorage ( FLASH_MESSAGES_LOCAL_STORAGE_KEY ) || [ ] ;
3030}
3131
32- const UserMessagesProvider = ( { children = null } ) => {
32+ const UserMessagesProvider = ( { children } ) => {
3333 // Note: The callbacks (add, remove, clear) below interact with useState in very subtle ways.
3434 // When we call setMessages, we always do so with the function-based form of the handler, making
3535 // use of the "current" state and not relying on lexical scoping to access the state exposed
@@ -102,4 +102,8 @@ UserMessagesProvider.propTypes = {
102102 children : PropTypes . node ,
103103} ;
104104
105+ UserMessagesProvider . defaultProps = {
106+ children : null ,
107+ } ;
108+
105109export default UserMessagesProvider ;
You can’t perform that action at this time.
0 commit comments