connexion a l'api d'avis

This commit is contained in:
2023-02-12 14:58:39 +01:00
parent 4e807430d1
commit 096f056e41
12 changed files with 195 additions and 83 deletions

View File

@@ -16,14 +16,16 @@ export default function AvisList({ avis }) {
<th>Date</th>
<th>Note globale</th>
<th>Commentaire</th>
<th>Source</th>
</tr>
</thead>
<tbody>
{avis.map(({ id, grade, comment, date }) => {
{avis.map(({ id, note_principale, commentaire, date, nom_source }) => {
return <tr onClick={() => handleClick(id)} key={id} className={styles.row}>
<td>{date}</td>
<td>{grade} / 10</td>
<td>{comment}</td>
<td>{note_principale} / 10</td>
<td>{commentaire}</td>
<td>{nom_source}</td>
</tr>
})}
</tbody>