From 222ca054c50f645482b88282da25b489590a55dd Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 11 Jul 2017 13:41:00 +0100 Subject: [PATCH] Use PropTypes.shape to define our required inputs --- src/components/structures/GroupView.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index da4162d6e0..92ba36a18f 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -42,7 +42,14 @@ const FeaturedRoom = React.createClass({ displayName: 'FeaturedRoom', props: { - summaryInfo: PropTypes.object.isRequired, + summaryInfo: PropTypes.shape({ + room_id: PropTypes.string.isRequired, + profile: PropTypes.shape({ + name: PropTypes.string, + avatar_url: PropTypes.string, + canonical_alias: PropTypes.string, + }).isRequired, + }).isRequired, }, onClick: function(e) { @@ -100,7 +107,9 @@ const FeaturedUser = React.createClass({ displayName: 'FeaturedUser', props: { - summaryInfo: PropTypes.object.isRequired, + summaryInfo: PropTypes.shape({ + user_id: PropTypes.string.isRequired, + }).isRequired, }, onClick: function(e) {