aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/ui/Users.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/ui/Users.js')
-rw-r--r--vnext/src/ui/Users.js28
1 files changed, 12 insertions, 16 deletions
diff --git a/vnext/src/ui/Users.js b/vnext/src/ui/Users.js
index a10bba7f..4c09318f 100644
--- a/vnext/src/ui/Users.js
+++ b/vnext/src/ui/Users.js
@@ -1,18 +1,28 @@
import React, { useState } from 'react';
-import PropTypes from 'prop-types';
-import ReactRouterPropTypes from 'react-router-prop-types';
import UserInfo from './UserInfo';
import Avatar from './Avatar';
+/**
+ * Friends feed
+ * @param {{match: import('react-router').match }} match
+ */
export function Friends({ match }) {
return <Users user={match.params.user} prop='read' />;
}
+/**
+ * Readers feed
+ * @param {{match: import('react-router').match }} match
+ */
export function Readers({ match }) {
return <Users user={match.params.user} prop='readers' />;
}
+/**
+ * UserInfo list component
+ * @param {{user: import('../api').User, prop: string}} props
+ */
function Users(props) {
const [user, setUser] = useState({ uid: 0, uname: props.user });
return (
@@ -28,17 +38,3 @@ function Users(props) {
</UserInfo>
);
}
-
-
-Friends.propTypes = {
- match: ReactRouterPropTypes.match.isRequired
-};
-
-Readers.propTypes = {
- match: ReactRouterPropTypes.match.isRequired
-};
-
-Users.propTypes = {
- user: PropTypes.string.isRequired,
- prop: PropTypes.string.isRequired
-};