import React from 'react'; import { Typography } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import { User } from 'which-types'; import Avatar from '../Avatar/Avatar'; interface PropTypes { user: User; } const useStyles = makeStyles(theme => ({ root: { padding: theme.spacing(4, 10), textAlign: 'center' }, avatar: { width: theme.spacing(14), height: theme.spacing(14) } })); const UserInfo: React.FC = React.memo(({ user }) => { const classes = useStyles(); return (
{user.username}
); }); export default UserInfo;