From f470636a70943a8ecad8bddc791a1c2dddd28e1e Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Sat, 4 May 2019 21:13:12 +0300 Subject: Components -> UI --- vnext/src/ui/Users.js | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 vnext/src/ui/Users.js (limited to 'vnext/src/ui/Users.js') diff --git a/vnext/src/ui/Users.js b/vnext/src/ui/Users.js new file mode 100644 index 00000000..a10bba7f --- /dev/null +++ b/vnext/src/ui/Users.js @@ -0,0 +1,44 @@ +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'; + +export function Friends({ match }) { + return ; +} + +export function Readers({ match }) { + return ; +} + +function Users(props) { + const [user, setUser] = useState({ uid: 0, uname: props.user }); + return ( + +
+ { + user[props.prop] && + user[props.prop].map(user => + + ) + } +
+
+ ); +} + + +Friends.propTypes = { + match: ReactRouterPropTypes.match.isRequired +}; + +Readers.propTypes = { + match: ReactRouterPropTypes.match.isRequired +}; + +Users.propTypes = { + user: PropTypes.string.isRequired, + prop: PropTypes.string.isRequired +}; -- cgit v1.2.3