summaryrefslogtreecommitdiff
path: root/src/modules/profile-card/index.tsx
blob: 881561dd09f5fce00d8028ef7bebb876de2d1b6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { Avatar, AvatarIcon, Card, CardBody } from '@nextui-org/react';
import { TEAM_ALIASES } from '@/common/constants/team';
import styles from "./profile-card.module.css"
import Dropdown from './components/Dropdown';
import getServerCredential from '@/common/libs/getServerCredential';

const ProfileCard = () => {
  const credential = getServerCredential()

  return credential && (
    <Card shadow='sm'>
      <CardBody className={styles.cardBody}>
        <Avatar icon={<AvatarIcon />} size='sm' isBordered color='primary' classNames={{ icon: 'text-white' }} />
        <div>
          <div className={styles.name}>{credential.name}</div>
          <div className={styles.description}>
            <span>
              {credential.company.name}
            </span>
            &#183;
            <span>
              Tim {TEAM_ALIASES[credential.team].name}
            </span>
          </div>
        </div>

        <div className="ml-auto">
          <Dropdown />
        </div>
      </CardBody>
    </Card>
  )
}

export default ProfileCard