el map keys ;p

This commit is contained in:
2022-12-29 17:32:44 +01:00
parent 72567fef84
commit db05967c05

View File

@@ -20,14 +20,15 @@ type UserProfileCardProps = {
accentColor?: string; accentColor?: string;
}; };
let placeholderPicture = "https://placewaifu.com/image/128?greyscale&blur";
const ProfileCard = (user: UserProfileCardProps) => { const ProfileCard = (user: UserProfileCardProps) => {
return ( return (
<> <>
<div className={styles.profile}> <div className={styles.profile}>
<article> <article>
<img src={user.picture || placeholderPicture} alt={user.username} /> <img
src={user.picture || "https://placewaifu.com/image/128"}
alt={user.username}
/>
<div className={styles.inner}> <div className={styles.inner}>
<header> <header>
<h1>{user.username}</h1> <h1>{user.username}</h1>
@@ -97,7 +98,7 @@ const ProfileCard = (user: UserProfileCardProps) => {
badgeImage?: string; badgeImage?: string;
}) => { }) => {
return ( return (
<section> <section key={el.badgeName}>
<h3>{el.badgeName}</h3> <h3>{el.badgeName}</h3>
<p>{el.badgeDesc}</p> <p>{el.badgeDesc}</p>
</section> </section>