aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Contact.js
blob: 820b3e0521d7662808b75921fb6bfb46203eb39c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import React from 'react';
import { UserType } from './Types';

import Avatar from './Avatar';

export default class Contact extends React.Component {

    render() {
        const { user } = this.props;
        return (
            <>
                <Avatar user={user} link={`/pm/${user.uname}`}>
                { user.unreadCount && <span className="badge">{user.unreadCount}</span>}
                </Avatar>
            </>
        );
    }
}

Contact.propTypes = {
    user: UserType
};