You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Use PropTypes.shape to define our required inputs
This commit is contained in:
@ -42,7 +42,14 @@ const FeaturedRoom = React.createClass({
|
|||||||
displayName: 'FeaturedRoom',
|
displayName: 'FeaturedRoom',
|
||||||
|
|
||||||
props: {
|
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) {
|
onClick: function(e) {
|
||||||
@ -100,7 +107,9 @@ const FeaturedUser = React.createClass({
|
|||||||
displayName: 'FeaturedUser',
|
displayName: 'FeaturedUser',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
summaryInfo: PropTypes.object.isRequired,
|
summaryInfo: PropTypes.shape({
|
||||||
|
user_id: PropTypes.string.isRequired,
|
||||||
|
}).isRequired,
|
||||||
},
|
},
|
||||||
|
|
||||||
onClick: function(e) {
|
onClick: function(e) {
|
||||||
|
Reference in New Issue
Block a user