diff options
author | Vitaly Takmazov | 2019-07-26 13:22:00 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:55 +0300 |
commit | f707d3d524d8d16e2bb780764f029d85fc57ecc0 (patch) | |
tree | 1580074a665bd16c9744b5749c2a777700c5ae73 /vnext/src/ui/Contact.js | |
parent | 6016b0888e77497e15384f1cd024eb42672129a4 (diff) |
prop-types -> jsdoc
Diffstat (limited to 'vnext/src/ui/Contact.js')
-rw-r--r-- | vnext/src/ui/Contact.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/vnext/src/ui/Contact.js b/vnext/src/ui/Contact.js index 24aabe15..9e6416bb 100644 --- a/vnext/src/ui/Contact.js +++ b/vnext/src/ui/Contact.js @@ -1,10 +1,18 @@ import React from 'react'; -import PropTypes from 'prop-types'; -import { UserType } from './Types'; import Avatar from './Avatar'; -function Contact({ user, style, ...rest }) { +/** + * @typedef {Object} ContactProps + * @property {import('../api').Chat} user + * @property {React.CSSProperties} style + */ + +/** + * Contact component + * @param {ContactProps} props + */ +function Contact({ user, style }) { return ( <Avatar user={user} link={`/pm/${user.uname}`} style={style}> {user.unreadCount && <span className="badge">{user.unreadCount}</span>} @@ -14,8 +22,3 @@ function Contact({ user, style, ...rest }) { } export default React.memo(Contact); - -Contact.propTypes = { - user: UserType, - style: PropTypes.object -}; |