diff options
Diffstat (limited to 'components/Avatar.js')
| -rw-r--r-- | components/Avatar.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/components/Avatar.js b/components/Avatar.js new file mode 100644 index 0000000..d008116 --- /dev/null +++ b/components/Avatar.js @@ -0,0 +1,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 > + ); +} |
