import { useRouter } from 'next/router'; import React from 'react' import { Table } from 'react-bootstrap' import styles from '../styles/AvisList.module.css' export default function AvisList({ avis }) { const router = useRouter(); function handleClick(id) { router.push(`/avis/${id}`); } function truncateComment(text) { if(text.length > 100) { return text.substring(0, 100) + "..." } return text; } return (
| Date | Note globale | Commentaire | Positivité | Source |
|---|---|---|---|---|
| {date} | {note_principale} / 10 | {truncateComment(commentaire)} | {analyse} | {nom_source} |