mirror of
https://git.roussel.pro/telecom-paris/pact.git
synced 2026-02-09 10:30:17 +01:00
connexion a l'api d'avis
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import { useRouter } from 'next/router';
|
||||
import React from 'react'
|
||||
import Avis from '../../components/Avis';
|
||||
import useReview from '../../hooks/review';
|
||||
export default function AvisPage() {
|
||||
const router = useRouter();
|
||||
const {id} = router.query;
|
||||
const {review, loading, error} = useReview(id);
|
||||
return (
|
||||
<Avis age={20} sex={"f"} text={"dfjlkmksgflkgsjmdf"} grade={9} date={"2023-10-12 12:34"} gradeOther={[{title: "Propreté", grade: 8},{title: "Lorem ipsum", grade: 8}]}/>
|
||||
!loading && !error && <Avis review={review}/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user