mirror of
https://github.com/element-hq/element-web.git
synced 2024-11-30 23:31:28 +03:00
Use PropTypes.shape to define our required inputs
This commit is contained in:
parent
29990296d2
commit
222ca054c5
1 changed files with 11 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue