Feat: ajout de la liste pour voir les activités et les athlètes en tant que coach/ admin

This commit is contained in:
Amaël Kesteman
2026-01-07 12:00:07 +01:00
parent d35405842d
commit 7a0bbb410f
5 changed files with 206 additions and 4 deletions

View File

@@ -0,0 +1,47 @@
import ListGroup from "react-bootstrap/ListGroup";
import { Athlete, Activite } from "../classes";
type Props = {
athletes: Athlete[];
activites: Activite[];
};
function AthleteList({ athletes }: Props) {
return (
<ListGroup>
{athletes.map((athlete) => (
<ListGroup.Item key={athlete.id}>
<div>
<strong>Nom:</strong> {athlete.nom}
</div>
<div>
<strong>Groupe:</strong> {athlete.groupe}
</div>
</ListGroup.Item>
))}
</ListGroup>
);
}
function ActiviteList({ activites }: Props) {
return (
<ListGroup>
{activites.map((activite) => (
<ListGroup.Item key={activite.id}>
<div>
<strong>Nom:</strong> {activite.nom}
</div>
<div>
<strong>Thème:</strong> {activite.theme}
</div>
<div>
<strong>Durée:</strong> {activite.duree} minutes
</div>
</ListGroup.Item>
))}
</ListGroup>
);
}
export { AthleteList, ActiviteList };