From a25c60544778a808b3845455acfa8d1a68fadb20 Mon Sep 17 00:00:00 2001 From: Boyadjie Date: Tue, 28 May 2024 17:45:58 +0200 Subject: [PATCH] feat(#47): set likes type to number --- src/components/blocs/preview/adress/AdressPreview.tsx | 5 +++-- src/components/map/MapPreview.tsx | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/blocs/preview/adress/AdressPreview.tsx b/src/components/blocs/preview/adress/AdressPreview.tsx index 439fdeb..c5b5616 100644 --- a/src/components/blocs/preview/adress/AdressPreview.tsx +++ b/src/components/blocs/preview/adress/AdressPreview.tsx @@ -8,7 +8,7 @@ type AdressProps = { title: string; subTitle: string; stars: number; - likes: string; + likes: number; imgUrl: string; }; @@ -46,7 +46,8 @@ export const AdressPreview: React.FC = ({ width={10} height={10} />{' '} - {likes} + {likes * 100} + {'%'} diff --git a/src/components/map/MapPreview.tsx b/src/components/map/MapPreview.tsx index 41be441..ccee9f9 100644 --- a/src/components/map/MapPreview.tsx +++ b/src/components/map/MapPreview.tsx @@ -19,7 +19,7 @@ const recommendations = [ title: 'Zerohachi Yakiniku restaurant OCAT', subTitle: 'La vraie viande grillée japonaise.', stars: 4.9, - likes: '97%', + likes: 0.97, imgUrl: '/images/map/recommendations/zerohachi_yakiniku_restaurant_ocat.jpg', }, @@ -27,14 +27,14 @@ const recommendations = [ title: 'Hanasato KOBE', subTitle: 'Dégustez du boeuf Hida.', stars: 4.6, - likes: '92%', + likes: 0.92, imgUrl: '/images/map/recommendations/hanasato_kobe.jpg', }, { title: 'Neiro', subTitle: 'La vraie viande grillée japonaise.', stars: 4.1, - likes: '95%', + likes: 0.95, imgUrl: '/images/map/recommendations/neiro.jpg', }, ];