Feat: ajout de la liste pour voir les activités et les athlètes en tant que coach/ admin
This commit is contained in:
47
front_end/src/components/ressourceList.tsx
Normal file
47
front_end/src/components/ressourceList.tsx
Normal 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 };
|
||||
Reference in New Issue
Block a user