Redesign volunteerCard

This commit is contained in:
T'JAMPENS QUENTIN p2406187 committed 2026-02-10 15:20:11 +01:00
1 parent 5cbfad4ade
commit 8441b9f3b2
3 files changed
+67 -5

No files matched your search

@@ -9,10 +9,21 @@ interface VolunteersCardProps {
}
export default function VolunteerCard({ user }: VolunteersCardProps) {
const navigate = useNavigate();
const handleNavigate = (): void => { navigate(`/profile/${user.id}`) }
return (
<div>
<div className={`glassCard ${styles.volunteerCard}`}>
<div className={styles.header}>
<img src={"/react.svg"} alt="profile" className={styles.profilePicture} />
<p> {user.name} {user.lastname} </p>
</div>
<div className={styles.content}>
<p> {user.email} </p>
<Button variant={"primary"} onClick={handleNavigate}>Voir</Button>
</div>
</div>
);
}
@@ -0,0 +1,47 @@
.volunteerCard {
display: flex;
flex-direction: column;
gap: 12px;
}
.header {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.header p {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.content {
display: flex;
align-items: center;
gap: 12px;
min-width: 0;
}
.content p {
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.content button {
flex-shrink: 0;
}
.profilePicture {
background-color: #1d1d1f;
border-radius: 20px;
width: 40px;
height: 40px;
flex-shrink: 0;
}