Skip to content

Commit 225a555

Browse files
committed
test: add prop types for location in docs
1 parent a97f1e2 commit 225a555

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

www/src/components/Layout.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ const propTypes = {
2020
}).isRequired,
2121
}).isRequired,
2222
}).isRequired,
23-
location: PropTypes.object.isRequired,
23+
location: PropTypes.shape({
24+
pathname: PropTypes.string.isRequired,
25+
}).isRequired,
2426
};
2527

2628
const NavItem = ({ active, to, children }) => (

www/src/templates/component.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ const propTypes = {
3333
).isRequired,
3434
}).isRequired,
3535
}).isRequired,
36-
location: PropTypes.object.isRequired,
36+
location: PropTypes.shape({
37+
pathname: PropTypes.string.isRequired,
38+
}).isRequired,
3739
data: PropTypes.shape({
3840
metadata: PropTypes.shape({
3941
displayName: PropTypes.string,

0 commit comments

Comments
 (0)