aboutsummaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorMaksymilian Jopek <maks@jopek.eu>2023-03-28 19:26:30 +0200
committerMaksymilian Jopek <maks@jopek.eu>2023-03-28 19:26:30 +0200
commitc3c90d575182d64b0e679e8da81a6d4f3559cf1f (patch)
treee1ad938d658e6c80c1392bca86d0755f47064882 /components
downloadnext-list-app-master.tar.gz
next-list-app-master.tar.zst
next-list-app-master.zip
Working appHEADmaster
Diffstat (limited to 'components')
-rw-r--r--components/Avatar.js20
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 >
+ );
+}