Skip to content

Commit c376589

Browse files
committed
update proptypes
1 parent dced9f6 commit c376589

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/components/lesson/LessonNavBar.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,13 @@ const LessonNavBar = ({prev_path, next_path}) => (
1919
);
2020

2121
LessonNavBar.propTypes = {
22-
prev_path: PropTypes.string.isRequired,
23-
next_path: PropTypes.string.isRequired,
22+
prev_path: PropTypes.string,
23+
next_path: PropTypes.string,
24+
};
25+
26+
LessonNavBar.defaultProps = {
27+
prev_path: undefined,
28+
next_path: undefined,
2429
};
2530

2631
export default LessonNavBar;

src/components/lesson/LessonsPane.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,12 @@ LessonsPane.propTypes = {
3333
}),
3434
).isRequired,
3535
base_path: PropTypes.string.isRequired,
36-
prev_slug: PropTypes.string.isRequired,
37-
next_slug: PropTypes.string.isRequired,
36+
prev_slug: PropTypes.string,
37+
next_slug: PropTypes.string,
3838
};
3939

40+
LessonsPane.defaultProps = {
41+
prev_slug: undefined,
42+
next_slug: undefined,
43+
};
4044
export default LessonsPane;

0 commit comments

Comments
 (0)