aboutsummaryrefslogtreecommitdiffstats
path: root/components/Avatar.js
blob: d008116589a0f8e1fc8a7630f2a369597944def3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import Link from 'next/link';
import styles from '../styles/Avatar.module.css'

export default function Avatar(props) {
  let id;
  if (props.full) {
    id = <h1>{props.data.id}</h1>;
  } else {
    id = <h1><Link href={"/av/" + props.data.id}>{props.data.id}</Link></h1>;
  }
  return (
    <div className={props.full ? styles.avBig : styles.av}>
      {id}
      <h4>{props.data.name}</h4>
      <h4>{props.data.title}</h4>
      <h5>{props.full ? props.data.description : null}</h5>
      <img src={props.data.icon} />
    </div >
  );
}