From d1c54e1224d2c8c46e91fe480527046cac26164d Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 15 Aug 2017 08:58:08 +0100 Subject: [PATCH] Switch to prop-types --- src/Invite.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Invite.js b/src/Invite.js index d825dac6f5..e7e7264d11 100644 --- a/src/Invite.js +++ b/src/Invite.js @@ -15,6 +15,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +import PropTypes from 'prop-types'; import MatrixClientPeg from './MatrixClientPeg'; import MultiInviter from './utils/MultiInviter'; import Modal from "./Modal"; @@ -30,20 +31,20 @@ export const addressTypes = [ 'mx', 'email', ]; -// React PropType definition for an object describing +// PropType definition for an object describing // an address that can be invited to a room (which // could be a third party identifier or a matrix ID) // along with some additional information about the // address / target. -export const InviteAddressType = React.PropTypes.shape({ - addressType: React.PropTypes.oneOf(addressTypes).isRequired, - address: React.PropTypes.string.isRequired, - displayName: React.PropTypes.string, - avatarMxc: React.PropTypes.string, +export const InviteAddressType = PropTypes.shape({ + addressType: PropTypes.oneOf(addressTypes).isRequired, + address: PropTypes.string.isRequired, + displayName: PropTypes.string, + avatarMxc: PropTypes.string, // true if the address is known to be a valid address (eg. is a real // user we've seen) or false otherwise (eg. is just an address the // user has entered) - isKnown: React.PropTypes.bool, + isKnown: PropTypes.bool, }); export function getAddressType(inputText) {