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

@@ -25,11 +25,12 @@
} }
.usersList { .usersList {
display: flex; display: grid;
align-items: center; gap: 16px;
flex-wrap: wrap; width: 100%;
gap: 10px; grid-template-columns: 1fr;
} }
.profileboard { .profileboard {
width: 100%; width: 100%;
max-width: 380px; max-width: 380px;
@@ -146,6 +147,9 @@
} }
.usersList { .usersList {
gap: 20px; gap: 20px;
grid-template-columns: repeat(3, 1fr);
padding-right: 5em;
padding-left: 5em;
} }
.profileboard { .profileboard {
max-width: 700px; max-width: 700px;
@@ -9,10 +9,21 @@ interface VolunteersCardProps {
} }
export default function VolunteerCard({ user }: VolunteersCardProps) { export default function VolunteerCard({ user }: VolunteersCardProps) {
const navigate = useNavigate(); const navigate = useNavigate();
const handleNavigate = (): void => { navigate(`/profile/${user.id}`) }
return ( 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> </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;
}